FAQs
Help: SDK is throwing error - `webhook_unreachable`. Why?
When would SDK throw `webhook_unreachable` error?
Posted by smallcase Gateway over 2 years ago
Where and How to register for webhook api at smallcase
Hi, do we have developer console where we can submit our public webhook api
Posted by Akash over 2 years ago
How to veriffy webhook checksu
const smallcaseAuthId = "XXXX"
const timestamp = "2021-12-20T09:20:53.130Z"
const message = timestamp+smallcaseAuthId;
const secret = 'XXXX';
const options = {
algorithm: 'HS256'
};
const secret = API_SECRET;
const checksum = jwt.sign(
message,
secret,
options
);
should i just use raw concatenated string of timestamp and smallcaseAuthId or put it in json as
to generate json webtoken, a sample code will be appreciated
{
message : message
}
Posted by Saurav over 2 years ago
Single Stock Update Webhook - Average Price
In the response of single stock update webhook, We have following response:
{
"batchId": "XXXXXXXXXXXXXX",
"buyAmount": 0,
"sellAmount": 24360.119999999995,
"quantity": 1,
"filled": 1,
"status": "COMPLETED",
"variety": "regular",
"completedDate": "2022-01-07T14:17:23.276Z",
"orders": [
{
"status": "COMPLETE",
"quantity": 10,
"tradingsymbol": "RELIANCE",
"transactionType": "SELL",
"averagePrice": 2436.0119999999997,
"exchange": "NSE",
"orderType": "MARKET",
"product": "CNC",
"filledQuantity": 10,
"exchangeOrderId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
],
"unplaced": [],
"transactionId": "XXXXXXXXXXXXXXXXXXXXXXXX",
"broker": "kite-leprechaun",
"smallcaseAuthId": "XXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2022-01-07T14:17:23.286Z",
"checksum": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Here, when the transaction type is SELL and we get the average price. What does this average Price represents? Is it the Sell Price per Share for this SELL transaction?
Similarly, when the transaction type is BUY and we get the average price. Is it the price at which those shares were bought or the weighted average price of all the shares for that ticker?
For ex. We buy 2 share of ticker X at price A and 1 share of same ticker X at price B.
The average price that we'll get in the BUY order of X at price B, is it the weighted average price for the current holdings (2 (at price A) +1 (at price B) = 3 shares) or the price at which that share was bought (B in this case) ?
Posted by Meet Patel over 2 years ago
Webhook HTTP Method
Hi, what kind of HTTP method will the single stock update webhook take?
Posted by Nipun Ramani over 2 years ago
Smallcase Webhook integration data
Hi, in the webhook integration, is the notification sent by your api going to be for the orders that were placed only on our Gateway?
Posted by Nipun Ramani almost 3 years ago