Position sizes for SPOT and FUTURES


I am trying to get balances for positions that are open on the SPOT and the FUTURES.

For FUTURES, I am using: `
positions = exchange.fapiPrivate_get_positionrisk( )

My understanding is that if positionAmt ZERO then the position is closed. - and - if positionSide = BUY, then positionAmt = sum(ALL of the BUY POSITIONS created)

QUESTION: is this ONLY for FUTURES? I want this information for SPOT markets too - how can I get it?


Spot don’t have position, please check details from this topic.

Thanks for the response :slight_smile:
Below, you said:

Spot trading doesn’t have positions like other instruments do because you are settling the trade immediately.

I thought I would use an example to understand things further.


orders = client.get_open_margin_orders(symbol=‘BNBBTC’)


Get all open orders on a symbol.


The 2 items show how one might 'get open orders"

My questions are as follows.


#QUESTION 1: Do FUTURES, MARGIN and SPOT use information from the SAME Order book


I ask because I saw the item below (that refers to an orderbook for FUTURES). I also saw a way to get an order book for SPOT. I did not see a way to look at an orderbook for MARGIN:


	def futures_order_book(self, **params):
    	"""Get the Order Book for the market


    	return self._request_futures_api('get', 'depth', data=params)

And I have also seen


    orderbook = exchange.fetch_order_book ( in_symbol, params = params )

> QUESTION: Is there fetch_order_book for MARGIN?