Interpreting an Order Book (example Kraken.com)

Interpreting an Order Book (example Kraken.com)

Manage alerts

Loading saved threads...

bliako · External communityPost link
External question — Quantitative Finance Stack Exchange Author: bliako Original post: https://quant.stackexchange.com/questions/66479 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. An (forex) Order Book (OB) for a trading (forex) pair (e.g. XBT-USD) has ASK and BID rows. Each row has PRICE and VOLUME (at least). Each row represents an offer for selling or buying a maximum of VOLUME amount at PRICE. Starting with a START-AMOUNT in BASE currency, how can I calculate exactly how many rows, starting from the 1st, i.e. the "cheaper-for-me"? It is a simple calculation yet I am confused: as to whether I need to use the ASK or BID rows. as to what currency is VOLUME in. as to whether VOLUME in ASK and VOLUME in BID are in different currencies. Sometimes I will need to buy USD with XBT and so I will need the USD-XBT OB which does not exist (at least in kraken.com where I focus), can I use XBT-USD OB in order to buy XBT with USD? How? Additionally, how should I use the "pair decimals" and "lot decimals" for the specific trading pair in order to do accurate, integer calculations? Note: terminology specifically refers to kraken.com 's OB from the kraken.com 's Asset-pair metadata but mainly I am asking: if someone tells us that in a specific book, currency (I guess BASE?) is expressed in 1 decimals and volume in 8, how can I do the calculations in integers to be accurate. (I realise that can be a question on its own and can ask it separately if people suggest it). I am not sure if different forex platforms have different conventions, if they do then I am working with kraken.com . Here is some example data specific to kraken.com: XBTUSD ( get it with this API call from browser : ASKS: 45867.70000,0.002 45870.90000,0.001 45873.80000,0.001 45875.90000,0.379 45880.70000,0.215 BIDS: 45867.60000,3.708 45867.30000,0.186 45866.80000,1.090 45865.90000,0.436 45865.50000,0.030 XBTUSD metadata ( get it with this API call from browser ): ... pair_decimals:1,lot_decimals:8 ... p.s. I have very little experience with finance, more with programming and algorithms.
Quote
Report
Bob Jansen · External communityPost link
External answer — Quantitative Finance Stack Exchange Author: Bob Jansen Original post: https://quant.stackexchange.com/a/66480 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. This question is unclear to me, what is your goal? It's in BTC Both BTC You can increase your BTC position and decrease your USD position by buying the pair and decrease your BTC position and increase your USD position by selling the pair. You can just multiply by the number of decimals to get ints?
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External answer — Quantitative Finance Stack Exchange Author: Bob Jansen Source score (net votes, not local likes): 3 Original post: https://quant.stackexchange.com/a/66480 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. This question is unclear to me, what is your goal? It's in BTC Both BTC You can increase your BTC position and decrease your USD position by buying the pair and decrease your BTC position and increase your USD position by selling the pair. You can just multiply by the number of decimals to get ints?

Cancel quote

Checking account access…