3commas-io / 3commas-official-api-docs

Official Documentation for the 3commas APIs
https://3commas.io
247 stars 87 forks source link

API call ver1/accounts/$account_id/account_table_data no longer returning on_orders #136

Closed tcurtin closed 2 years ago

tcurtin commented 2 years ago

Unsure when the change occurred, but I'm no longer receiving on_orders in calls to ver1/accounts/$account_id/account_table_data. Is this intentional? Is there a new place to get this value, or do I have to assemble it based on values from bot data calls?

tcurtin commented 2 years ago

(In case this is exchange-dependent, I'm using Coinbase Pro.)

tcurtin commented 2 years ago

so https://api.3commas.io/public/api/ver1/accounts/summary/account_table_data returns a set of data per currency. Each of those currency structures does include an account_id, but does not include its on_orders value. $VAR1 = [ { 'equity' => '0.16125636', 'day_change_percent_usd' => '1.52247439917675', 'borrowed' => '0', 'day_change_percent_btc' => '0', 'currency_code' => 'BTC', 'ase_id' => 'xxx’, 'account_id' => xxx, 'current_price' => '0.999999983105712', 'currency_slug' => 'bitcoin', 'position' => '0.12786059', 'btc_value' => '0.127860587839886', 'percentage' => '23.1071636597503', 'slug' => 'bitcoin', 'currency_icon' => 'https://3commas.io/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbmdRIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3a478f99b60609e1d8cd4ba545e785d14a8175b7/1.png', 'current_price_usd' => '40122.8893221523', 'currency_name' => 'Bitcoin', 'usd_value' => '5130.1363012351' },

now called again with the accountid: https://api.3commas.io/public/api/ver1/accounts/xxx/account_table_data I get back on_orders values: $VAR1 = [ { 'currency_slug' => 'bitcoin', 'on_orders' => '0.03339578', 'on_orders_long' => '0', 'day_change_percent_btc' => 0, 'currency_code' => 'BTC', 'available_with_leverage_long' => '0', 'on_orders_short' => '0', 'equity' => '0.12786059', 'borrowed' => '0', 'day_change_percent' => 0, 'current_price_usd' => '40129.12', 'day_change_percent_usd' => '1.5382380945513', 'currency_icon' => 'https://3commas.io/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbmdRIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3a478f99b60609e1d8cd4ba545e785d14a8175b7/1.png', 'position_type' => '0', 'available_long' => '0', 'available_with_leverage_short' => '0', 'available_short' => '0', 'position' => '0.12786059', 'btc_value' => '0.127860587839886', 'currency_name' => 'Bitcoin', 'current_price' => '1', 'account_id' => xxx, 'percentage' => '23.0980671354852', 'usd_value' => '5130.93287269734' },

the only difference is calling with account_id set to ‘summary’ or one of the numeric accountids. In my case, I only have a single account, so I making the same call twice to get the same data twice plus a few extra fields

EfremovEvgeniy commented 2 years ago

Hi, fixed. Thank you!