It looks like the GetPositions and GetMargins methods in Kite throws an exception when trying to create the response structure. When I changed the method argument to dynamic instead of Dictionary it works. So I wonder if anyone faces the same problem?