@@ -3577,6 +3577,52 @@ public function preventedMatches(string $symbol, ?string $preventedMatchId = nul
35773577 return $ this ->apiRequest ("v3/myPreventedMatches " , 'GET ' , array_merge ($ request , $ params ), true );
35783578 }
35793579
3580+ /**
3581+ * allocations - Get the allocations resulting from SOR order placement
3582+ *
3583+ * @link https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-allocations-user_data
3584+ *
3585+ * @property int $weight 20
3586+ *
3587+ * @param string $symbol (mandatory) The symbol, e.g. BTCUSDT
3588+ * @param int $startTime (optional) The start time of the query
3589+ * @param int $endTime (optional) The end time of the query
3590+ * @param string $fromAllocationId (optional) The ID of the allocation to start from
3591+ * @param int $limit (optional) The number of results to return (default is 500, max is 1000)
3592+ * @param string $orderId (optional) The ID of the order
3593+ * @param array $params (optional) An array of additional parameters that the API endpoint allows
3594+ *
3595+ * @return array with error message or the rate limit details
3596+ * @throws \Exception
3597+ */
3598+ public function allocations (string $ symbol , ?int $ startTime = null , ?int $ endTime = null , ?string $ fromAllocationId = null , ?int $ limit = null , ?string $ orderId = null , array $ params = []) {
3599+ $ request = [
3600+ 'symbol ' => $ symbol ,
3601+ ];
3602+
3603+ if ($ startTime ) {
3604+ $ request ['startTime ' ] = $ startTime ;
3605+ }
3606+
3607+ if ($ endTime ) {
3608+ $ request ['endTime ' ] = $ endTime ;
3609+ }
3610+
3611+ if ($ fromAllocationId ) {
3612+ $ request ['fromAllocationId ' ] = $ fromAllocationId ;
3613+ }
3614+
3615+ if (!is_null ($ limit )) {
3616+ $ request ['limit ' ] = $ limit ;
3617+ }
3618+
3619+ if ($ orderId ) {
3620+ $ request ['orderId ' ] = $ orderId ;
3621+ }
3622+
3623+ return $ this ->apiRequest ("v3/myAllocations " , 'GET ' , array_merge ($ request , $ params ), true );
3624+ }
3625+
35803626 /**
35813627 * ocoOrder - Create a new OCO order
35823628 *
0 commit comments