AsthaTech / govortex

Golang SDK to trade with AsthaTrade
https://asthatrade.com/vortex
MIT License
1 stars 1 forks source link

Unable to fetch margin for a collection of orders #1

Open gmehta693 opened 8 months ago

gmehta693 commented 8 months ago

I couldn't find the method to fetch margin for basket orders in the go client for Vortex. Is it not implemented yet or missing from the docs?

And when I hit the basket margin API manually, the initial and final margin are null in the response.

Sample response:

{
    "status": "error",
    "initial_margin": ,
    "required_margin": ,
}

Sample request body:

{
    "orders": [
        {
            "exchange": "NSE_FO",
            "token": 65582,
            "transaction_type": "BUY",
            "product_type": "INTRADAY",
            "variety": "RL",
            "quantity": 50,
            "price": 50
        },
        {
            "exchange": "NSE_FO",
            "token": 65582,
            "transaction_type": "SELL",
            "product_type": "INTRADAY",
            "variety": "RL",
            "quantity": 50,
            "price": 50
        },
        {
            "exchange": "NSE_FO",
            "token": 65582,
            "transaction_type": "SELL",
            "product_type": "INTRADAY",
            "variety": "SL",
            "quantity": 50,
            "price": 35
        }
    ]
}
brisingr123 commented 8 months ago

@gmehta693 , can you check the api response now ? Basket order will be available in the upcoming go sdk scheduled to be released on 25th Dec.

gmehta693 commented 8 months ago

@brisingr123 Thanks! API seems to be working now