nobitex / docs-api

Nobitex Cryptocurrency Exchange Market API Documentation
https://apidocs.nobitex.ir
Apache License 2.0
57 stars 30 forks source link

Discrepancy in API: USDT to IRT Exchange Rate Appears as USDT to IRR #205

Closed Azura-lee-code closed 9 months ago

Azura-lee-code commented 10 months ago

شرح خطا

I've encountered an issue with the API where the exchange rate for USDT to IRT (Iranian Toman) seems to be incorrectly displayed as the rate for USDT to IRR (Iranian Rial). This could potentially lead to confusion or inaccurate data representation for users relying on this exchange rate information. Could you please confirm if this is indeed an error and, if so, look into correcting it? This clarification is important for ensuring accurate financial transactions and data representation in the API. Thank you for your attention to this matter.

جزئیات درخواست

  1. آدرس: POST /sample/url
  2. داده:
    • key1: value1
    • key2: value2
    • ...
  3. هدر:
    • Authorization: yes
    • ...
  4. محیط:
    • تست‌نت
    • اصلی

پاسخ دریافتی

{ "status": "ok", "stats": { "usdt-irt": { "isClosed": false, "bestSell": "508580", "bestBuy": "508500", "volumeSrc": "1348464.828529987175", "volumeDst": "683604463380.284202921", "latest": "508500", "dayLow": "505100", "dayHigh": "509950", "dayOpen": "506210", "dayClose": "508500", "dayChange": "0.45" } }, "global": { "binance": { "mkr": 1392.2, "srm": 0.287, "c98": 0.1846, "sfp": 0.6697, "1000xec": 0.02933, "xem": 0.0378, "zen": 10.66, "eth": 2017.9, "mtl": 1.6331, "bat": 0.2184, "ldo": 2.3998, "enj": 0.2797, "rsr": 0.00244, "omg": 0.6438, "ata": 0.0922, "iost": 0.00905, "stg": 0.5409, "doge": 0.07696, "algo": 0.1392, "ankr": 0.02592, "chz": 0.07546, "zrx": 0.383, "avax": 20.736, "sc": 0.00365, "tomo": 1.2792, "ar": 8.087, "celo": 0.531, "sxp": 0.3614, "ocean": 0.4784, "dot": 5.238, "unfi": 9.626, "alpha": 0.0945, "spell": 0.00048, "one": 0.01387, "bts": 0.01251, "egld": 43.98, "inj": 15.696, "dusk": 0.1586, "ren": 0.05802, "kava": 0.7561, "neo": 11.145, "bch": 227.12, "cvc": 0.1232, "sushi": 1.0454, "lpt": 6.947, "sol": 55.847, "woo": 0.23172, "nkn": 0.11224, "fil": 4.636, "aave": 89.93, "hot": 0.00156, "football": 380.83, "gtc": 1.098, "qnt": 98.7, "ape": 1.49, "vet": 0.0212, "ant": 5.142, "bel": 0.6247, "snx": 3.401, "bake": 0.1509, "stmx": 0.00814, "luna2": 0.6176, "reef": 0.00163, "ogn": 0.1201, "gal": 1.3691, "rlc": 1.4875, "xtz": 0.842, "eos": 0.705, "cvx": 3.667, "coti": 0.04978, "storj": 0.7423, "hnt": 1.433, "imx": 1.2942, "op": 1.722, "arpa": 0.05294, "dash": 30.79, "mana": 0.4177, "celr": 0.01504, "grt": 0.14075, "1inch": 0.3564, "bluebird": 7.372, "rose": 0.07016, "defi": 773.6, "ksm": 24.32, "lina": 0.01024, "atom": 8.915, "chr": 0.1326, "iotx": 0.02413, "xmr": 164.83, "ftm": 0.3094, "iota": 0.1855, "btcdom": 2119.2, "ctk": 0.4928, "uni": 5.166, "trx": 0.10103, "ont": 0.2213, "crv": 0.567, "knc": 0.769, "rvn": 0.01759, "theta": 0.9434, "icx": 0.2639, "skl": 0.06043, "api3": 1.4435, "klay": 0.1803, "waves": 2.1395, "tlm": 0.0131, "ada": 0.3837, "alice": 0.994, "1000lunc": 0.07614, "flow": 0.659, "mask": 3.596, "lrc": 0.2222, "near": 1.939, "dar": 0.1129, "audio": 0.1883, "people": 0.0125, "ctsi": 0.1483, "matic": 0.8046, "bal": 3.701, "zil": 0.02192, "ens": 8.711, "dgb": 0.00795, "xlm": 0.11925, "jasmy": 0.0051, "dent": 0.00081, "qtum": 3.16, "ftt": 1.59, "ltc": 69.71, "flm": 0.0808, "rune": 5.151, "zec": 28.86, "shib": 0.0084, "axs": 6.126, "band": 1.5145, "gmt": 0.2646, "etc": 19.404, "trb": 86.599, "icp": 4.535, "comp": 51.02, "link": 14.367, "hbar": 0.0648, "xrp": 0.6127, "bnx": 0.2918, "ray": 0.248, "dydx": 3.035, "yfi": 8260.0, "btc": 37530.0, "apt": 7.235, "lit": 0.907, "sand": 0.4092, "blz": 0.24856, "bnb": 262.65, "usdt": 1, "usdc": 1, "busd": 1, "dai": 1, "wbtc": 37530.0, "egala": 0.02608, "inch": 0.3982, "fet": 0.5202, "fxs": 7.038, "hook": 0.9385, "magic": 0.6771, "babydoge": 2.497, "t": 0.02387, "rndr": 3.322, "mina": 0.6348, "high": 1.372, "dao": 0.895, "glm": 0.2539, "astr": 0.06581, "agix": 0.2854, "phb": 0.7845, "gmx": 51.27, "cfx": 0.1562, "ach": 0.0198, "ssv": 17.55, "cocos": 1.454, "stx": 0.6292, "nmr": 15.8, "ckb": 0.0033, "snt": 0.04183, "perp": 0.6293, "ilv": 104.35, "slp": 0.00269, "tru": 0.04587, "lqty": 1.4118, "1b_babydoge": 1.24, "blur": 0.3152, "100k_floki": 3.066, "id": 0.2584, "arb": 1.0242, "joe": 0.3574, "amb": 0.00821, "lever": 0.00133, "rdnt": 0.2521, "hft": 0.2754, "xvs": 7.522, "edu": 0.6103, "idex": 0.05587, "sui": 0.5509, "1000pepe": 0.00112, "1000floki": 0.03058, "1m_btt": 0.49, "1m_nft": 0.3117, "rad": 1.584, "uma": 1.804, "key": 0.00542, "combo": 0.6193, "ton": 2.328, "mav": 0.2762, "mdt": 0.04912, "xvg": 0.00345, "wld": 2.3137, "pendle": 1.0871, "arkm": 0.4242, "agld": 0.7953, "ygg": 0.3791, "dodox": 0.1185, "bnt": 0.7403, "oxt": 0.07395, "sei": 0.169, "cyber": 6.307, "jst": 0.03173, "flr": 0.01092, "hifi": 0.7957, "ark": 1.5355, "front": 0.3188, "glmr": 0.2494, "bico": 0.2697, "strax": 0.9547, "loom": 0.1249, "bigtime": 0.1727, "bond": 3.88, "orbs": 0.04433, "stpt": 0.06967, "waxp": 0.06548, "bsv": 47.69, "rif": 0.10006, "polyx": 0.2032, "gas": 8.253, "powr": 0.277, "tia": 5.6995, "cake": 2.675, "meme": 0.02671, "twt": 1.2158, "token": 0.02644, "ordi": 20.259, "steem": 0.2683, "badger": 3.749, "ntrn": 0.4543, "mbl": 0.00562, "kas": 0.12805, "beamx": 0.00885 } } }

پاسخ مورد انتظار

skip

پیوند مراجع

No response

اطلاعات تکمیلی

No response

z-amini commented 10 months ago

@Azura-lee-code Yes, we confirm this is an error. In fact, all prices in our API is in IRR rather than IRT. Local people here are more used to see IRT values, while IRR is known to be the official currency globally. The conversion of values happen in front-end and since market pair is also displayed, IRT was opted to correspond displaying values. The currency symbol of IRT (outside market pair) used in APIs is rls which is again a not standard representation of IRR.

Switching fully to IRR in front-end is never an option, since IRT is more accepted in experience. Changing backend units to IRT also requires lots of efforts, so we don't think this would happen in near future. Normalizing rls and IRT pairs was always an objective, but I'm not pretty sure we could achieve that so soon. I will transfer your concern and inform you of any new updates on this issue.

p.s. TradingView chart data feed endpoint (/market/udf/history) is an exception though, since applying the conversion wasn't easily achievable in the library.

z-amini commented 10 months ago

@Azura-lee-code Yes, all values in markets with IRT quote are in IRR (Rial) in API. [except for chart data feed which is in Toman.] So if you tend to buy 1 USDT, best sell price you can trade with is 509,670 IRR. But if you check the website at the same time, the values are converted to Toman (divided by 10), so you'll see 50,967 Toman on the website for USDT best sell price.

Azura-lee-code commented 10 months ago

@z-amini Your explanation was really helpful, thank you.

Azura-lee-code commented 10 months ago

@z-amini

Thank you for your reply. I also would like to confirm the following:

Does "BestSell" refer to the platform's selling price when a user places an order, and is it also the user's buying price? Similarly, does "BestBuy" refer to the platform's buying price at the time of a user's order, and is it also the user's selling price?

Regarding "dayLow," is this the lowest USDT buying price on your platform for the current day, up until the time the API information is accessed by the user? Conversely, does "dayHigh" represent the highest USDT selling price on your platform for the day, up to the point of API access? In other words, is "dayLow" always less than or equal to the "bestBuy" price, and "dayHigh" always greater than or equal to the "bestSell" price?

Lastly, could you please elaborate on what "dayChange" represents in your API?

Your clarification on these matters will greatly assist in better understanding and utilizing your API services.

Thank you for your assistance.

z-amini commented 10 months ago

@Azura-lee-code

Does "BestSell" refer to the platform's selling price when a user places an order, and is it also the user's buying price?

Yes. bestSell is the lowest price of sell orders in order book, which is possibly the best price user can trade with at the moment.

Similarly, does "BestBuy" refer to the platform's buying price at the time of a user's order, and is it also the user's selling price?

:+1: Similarly, bestBuy is the highest price of buy orders in order book.

Regarding "dayLow," is this the lowest USDT buying price on your platform for the current day, up until the time the API information is accessed by the user? Conversely, does "dayHigh" represent the highest USDT selling price on your platform for the day, up to the point of API access?

Sort of yes. dayLow and dayHigh are respectively the lowest and highest traded price in our market during last 24 hours.

In other words, is "dayLow" always less than or equal to the "bestBuy" price, and "dayHigh" always greater than or equal to the "bestSell" price?

Not necessarily. Since bestBuy refers to an order in order book, waiting to be traded. (For example, when a market price was Falling the whole day, lowest price would be the latest trade price and the best bid in order book is likely to be less than that.)

Lastly, could you please elaborate on what "dayChange" represents in your API?

It shows the market price change percentage during last 24 hour. By market price I mean traded price.

Azura-lee-code commented 10 months ago

For example, when a market price was Falling the whole day, lowest price would be the latest trade price and the best bid in order book is likely to be less than that. Thank you for your explanation.

If the market price has been declining throughout the day and a new trade is executed at a price lower than the current 'dayLow', will 'dayLow' price be immediately updated?

z-amini commented 10 months ago

@Azura-lee-code Currently speaking, the update rate of this data is about once per 10 seconds. In case you need more precision, market trades endpoint (/v2/trades/) responses are updated immediately.