{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats","title":"Obtener estadísticas de trading de la cuenta del trader","description":"GET /accounts/{accountId}/stats: Agregados sobre las posiciones cerradas de la cuenta: tasa de aciertos, beneficio y pérdida promedio, ratio riesgo beneficio, drawdown máximo y…","kind":"api-operation","locale":"es","inLanguage":"es","translation":{"sourceLanguage":"en","targetLanguage":"es","status":"complete","translatedUnits":41,"totalUnits":41},"lastModified":"2026-09-28T20:05:09.350Z","revision":"3c2fd254d25c5fe88817d5c939afd24407f25862bdfb7b9dc8ab5105728c7abe","section":{"title":"Developers","url":"https://docs.upscale.trade/es/developers"},"representations":{"html":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats","markdown":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats.md","json":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/getaccounttradingstats","ru":"https://docs.upscale.trade/ru/developers/operations/getaccounttradingstats","es":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats"},"operation":{"id":"getAccountTradingStats","method":"GET","path":"/accounts/{accountId}/stats","summary":"Obtener estadísticas de trading de la cuenta del trader","description":"Agregados sobre las posiciones cerradas de la cuenta: tasa de aciertos, beneficio y pérdida promedio, ratio riesgo-beneficio, drawdown máximo y tiempos de tenencia promedio.\n\n- Responde con un cuerpo vacío mientras la cuenta aún no tiene posiciones cerradas.\n- Cubre cada fase por la que ha pasado la cuenta, no solo la actual.","tags":["Accounts"],"tagLabels":{"Accounts":"Cuentas","Config":"Configuración","Trading":"Trading"},"deprecated":false,"parameters":[{"name":"accountId","location":"path","schema":{"type":"string · uuid","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid"},"properties":[],"variants":[]},"type":"string · uuid","required":true,"description":"Identificador de la cuenta del trader. Debe pertenecer al solicitante.","example":"00000000-0000-4000-8000-000000000000"}],"bodies":[],"responses":[{"status":"200","description":"Respuesta","mediaType":"application/json","properties":[{"name":"sumPnl","type":"string · int32","required":true,"description":"Realised pnl summed over every closed position, fp9 raw, before fees and funding.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Realised pnl summed over every closed position, fp9 raw, before fees and funding.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sumFee","type":"string · int32","required":true,"description":"Trading fees paid over every closed position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trading fees paid over every closed position, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sumFunding","type":"string · int32","required":true,"description":"Funding settled over every closed position, fp9 raw. Positive when the account received more than it paid.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Funding settled over every closed position, fp9 raw. Positive when the account received more than it paid.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"profit","type":"string · int32","required":true,"description":"Net result of the closed positions, fp9 raw: pnl minus fees plus funding. This is what the win rate splits on.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Net result of the closed positions, fp9 raw: pnl minus fees plus funding. This is what the win rate splits on.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"positionsCount","type":"number","required":true,"description":"Number of closed positions the statistics are built from.","example":"0","schema":{"type":"number","types":["number"],"description":"Number of closed positions the statistics are built from.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"profitablePositionsCount","type":"number","required":true,"description":"Closed positions that ended at or above break-even.","example":"0","schema":{"type":"number","types":["number"],"description":"Closed positions that ended at or above break-even.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"unprofitablePositionsCount","type":"number","required":true,"description":"Closed positions that ended below break-even.","example":"0","schema":{"type":"number","types":["number"],"description":"Closed positions that ended below break-even.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"winratePercent","type":"number","required":true,"description":"Share of closed positions that ended at or above break-even, in percent with two decimals.","example":"62.5","schema":{"type":"number","types":["number"],"description":"Share of closed positions that ended at or above break-even, in percent with two decimals.","example":62.5,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"minProfit","type":"string · int32 · nullable","required":true,"description":"Smallest win among profitable positions, fp9 raw. Null when there is none.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Smallest win among profitable positions, fp9 raw. Null when there is none.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"minLoss","type":"string · int32 · nullable","required":true,"description":"Smallest loss among losing positions, fp9 raw (negative, closest to zero). Null when there is none.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Smallest loss among losing positions, fp9 raw (negative, closest to zero). Null when there is none.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"maxProfit","type":"string · int32 · nullable","required":true,"description":"Largest win, fp9 raw. Null when no position ended in profit.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Largest win, fp9 raw. Null when no position ended in profit.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"maxLoss","type":"string · int32 · nullable","required":true,"description":"Largest loss, fp9 raw (the most negative value). Null when no position ended in loss.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Largest loss, fp9 raw (the most negative value). Null when no position ended in loss.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"avgProfit","type":"string · int32 · nullable","required":true,"description":"Average win across profitable positions, fp9 raw. Null when there is none.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Average win across profitable positions, fp9 raw. Null when there is none.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"avgLoss","type":"string · int32 · nullable","required":true,"description":"Average loss across losing positions, fp9 raw (negative). Null when there is none.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Average loss across losing positions, fp9 raw (negative). Null when there is none.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"riskRewardRatio","type":"number[]","required":true,"description":"Average win over the absolute average loss. Null while no losing position exists to divide by.","schema":{"type":"number[]","types":["array"],"description":"Average win over the absolute average loss. Null while no losing position exists to divide by.","example":1.8,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxDrawdownPercent","type":"number[]","required":true,"description":"Deepest equity drawdown of the account across all its phases, in percent with two decimals.","schema":{"type":"number[]","types":["array"],"description":"Deepest equity drawdown of the account across all its phases, in percent with two decimals.","example":12.34,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLongPositionHoldTime","type":"number[]","required":true,"description":"Average holding time of long positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Average holding time of long positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgShortPositionHoldTime","type":"number[]","required":true,"description":"Average holding time of short positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Average holding time of short positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgPositionHoldTime","type":"number[]","required":true,"description":"Average holding time across all closed positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Average holding time across all closed positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianPositionHoldTime","type":"number[]","required":true,"description":"Median holding time across all closed positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Median holding time across all closed positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxProfitablePositionHoldTime","type":"number[]","required":true,"description":"Longest a profitable position was held, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Longest a profitable position was held, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxUnprofitablePositionHoldTime","type":"number[]","required":true,"description":"Longest a losing position was held, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Longest a losing position was held, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianProfitablePositionHoldTime","type":"number[]","required":true,"description":"Median holding time of profitable positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Median holding time of profitable positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianUnprofitablePositionHoldTime","type":"number[]","required":true,"description":"Median holding time of losing positions, in seconds.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Median holding time of losing positions, in seconds.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLeverageProfitablePosition","type":"number[]","required":true,"description":"Average leverage of profitable positions — notional over margin, as a plain multiple.","schema":{"type":"number[]","types":["array"],"description":"Average leverage of profitable positions — notional over margin, as a plain multiple.","example":12,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLeverageUnprofitablePosition","type":"number[]","required":true,"description":"Average leverage of losing positions — notional over margin, as a plain multiple.","schema":{"type":"number[]","types":["array"],"description":"Average leverage of losing positions — notional over margin, as a plain multiple.","example":20,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"topMarket","type":"string[]","required":true,"description":"Base asset ticker of the most traded market, by number of closed positions. Null when nothing has been closed.","schema":{"type":"string[]","types":["array"],"description":"Base asset ticker of the most traded market, by number of closed positions. Null when nothing has been closed.","example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"topMarketPercent","type":"number[]","required":true,"description":"Share of closed positions that were on `topMarket`, in percent with two decimals.","schema":{"type":"number[]","types":["array"],"description":"Share of closed positions that were on `topMarket`, in percent with two decimals.","example":41.67,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/AccountTradingStatsResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"sumPnl","type":"string · int32","required":true,"description":"pnl realizado sumado sobre cada posición cerrada, fp9 en bruto, antes de comisiones y financiación.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"pnl realizado sumado sobre cada posición cerrada, fp9 en bruto, antes de comisiones y financiación.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sumFee","type":"string · int32","required":true,"description":"Comisiones de trading pagadas sobre cada posición cerrada, fp9 en bruto.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Comisiones de trading pagadas sobre cada posición cerrada, fp9 en bruto.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sumFunding","type":"string · int32","required":true,"description":"Financiación liquidada sobre cada posición cerrada, fp9 en bruto. Positiva cuando la cuenta recibió más de lo que pagó.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Financiación liquidada sobre cada posición cerrada, fp9 en bruto. Positiva cuando la cuenta recibió más de lo que pagó.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"profit","type":"string · int32","required":true,"description":"Resultado neto de las posiciones cerradas, fp9 en bruto: pnl menos comisiones más financiación. Esto es según lo que se divide la tasa de aciertos.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Resultado neto de las posiciones cerradas, fp9 en bruto: pnl menos comisiones más financiación. Esto es según lo que se divide la tasa de aciertos.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"positionsCount","type":"number","required":true,"description":"Número de posiciones cerradas a partir de las cuales se construyen las estadísticas.","example":"0","schema":{"type":"number","types":["number"],"description":"Número de posiciones cerradas a partir de las cuales se construyen las estadísticas.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"profitablePositionsCount","type":"number","required":true,"description":"Posiciones cerradas que terminaron en el punto de equilibrio o por encima de él.","example":"0","schema":{"type":"number","types":["number"],"description":"Posiciones cerradas que terminaron en el punto de equilibrio o por encima de él.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"unprofitablePositionsCount","type":"number","required":true,"description":"Posiciones cerradas que terminaron por debajo del punto de equilibrio.","example":"0","schema":{"type":"number","types":["number"],"description":"Posiciones cerradas que terminaron por debajo del punto de equilibrio.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"winratePercent","type":"number","required":true,"description":"Proporción de posiciones cerradas que terminaron en el punto de equilibrio o por encima de él, en porcentaje con dos decimales.","example":"62.5","schema":{"type":"number","types":["number"],"description":"Proporción de posiciones cerradas que terminaron en el punto de equilibrio o por encima de él, en porcentaje con dos decimales.","example":62.5,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"minProfit","type":"string · int32 · nullable","required":true,"description":"Ganancia más pequeña entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Ganancia más pequeña entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"minLoss","type":"string · int32 · nullable","required":true,"description":"Pérdida más pequeña entre las posiciones perdedoras, fp9 en bruto (negativa, la más cercana a cero). Nulo cuando no hay ninguna.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Pérdida más pequeña entre las posiciones perdedoras, fp9 en bruto (negativa, la más cercana a cero). Nulo cuando no hay ninguna.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"maxProfit","type":"string · int32 · nullable","required":true,"description":"Ganancia más grande, fp9 en bruto. Nulo cuando ninguna posición terminó en ganancia.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Ganancia más grande, fp9 en bruto. Nulo cuando ninguna posición terminó en ganancia.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"maxLoss","type":"string · int32 · nullable","required":true,"description":"Pérdida más grande, fp9 en bruto (el valor más negativo). Nulo cuando ninguna posición terminó en pérdida.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Pérdida más grande, fp9 en bruto (el valor más negativo). Nulo cuando ninguna posición terminó en pérdida.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"avgProfit","type":"string · int32 · nullable","required":true,"description":"Ganancia promedio entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Ganancia promedio entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"avgLoss","type":"string · int32 · nullable","required":true,"description":"Pérdida promedio entre las posiciones perdedoras, fp9 en bruto (negativa). Nulo cuando no hay ninguna.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Pérdida promedio entre las posiciones perdedoras, fp9 en bruto (negativa). Nulo cuando no hay ninguna.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"riskRewardRatio","type":"number[]","required":true,"description":"Ganancia promedio sobre la pérdida promedio absoluta. Nulo mientras no exista ninguna posición perdedora por la que dividir.","schema":{"type":"number[]","types":["array"],"description":"Ganancia promedio sobre la pérdida promedio absoluta. Nulo mientras no exista ninguna posición perdedora por la que dividir.","example":1.8,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxDrawdownPercent","type":"number[]","required":true,"description":"La mayor caída del capital de la cuenta en todas sus fases, en porcentaje con dos decimales.","schema":{"type":"number[]","types":["array"],"description":"La mayor caída del capital de la cuenta en todas sus fases, en porcentaje con dos decimales.","example":12.34,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLongPositionHoldTime","type":"number[]","required":true,"description":"Tiempo promedio de mantenimiento de las posiciones largas, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Tiempo promedio de mantenimiento de las posiciones largas, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgShortPositionHoldTime","type":"number[]","required":true,"description":"Tiempo promedio de mantenimiento de las posiciones cortas, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Tiempo promedio de mantenimiento de las posiciones cortas, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgPositionHoldTime","type":"number[]","required":true,"description":"Tiempo promedio de tenencia en todas las posiciones cerradas, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Tiempo promedio de tenencia en todas las posiciones cerradas, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianPositionHoldTime","type":"number[]","required":true,"description":"Mediana del tiempo de tenencia en todas las posiciones cerradas, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Mediana del tiempo de tenencia en todas las posiciones cerradas, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxProfitablePositionHoldTime","type":"number[]","required":true,"description":"Tiempo máximo que se mantuvo una posición rentable, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Tiempo máximo que se mantuvo una posición rentable, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"maxUnprofitablePositionHoldTime","type":"number[]","required":true,"description":"Tiempo máximo que se mantuvo una posición perdedora, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Tiempo máximo que se mantuvo una posición perdedora, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianProfitablePositionHoldTime","type":"number[]","required":true,"description":"Mediana del tiempo de tenencia de las posiciones rentables, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Mediana del tiempo de tenencia de las posiciones rentables, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"medianUnprofitablePositionHoldTime","type":"number[]","required":true,"description":"Mediana del tiempo de mantenimiento de las posiciones perdedoras, en segundos.","example":"[\n  0\n]","schema":{"type":"number[]","types":["array"],"description":"Mediana del tiempo de mantenimiento de las posiciones perdedoras, en segundos.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLeverageProfitablePosition","type":"number[]","required":true,"description":"Apalancamiento promedio de las posiciones rentables — nocional sobre margen, como un múltiplo simple.","schema":{"type":"number[]","types":["array"],"description":"Apalancamiento promedio de las posiciones rentables — nocional sobre margen, como un múltiplo simple.","example":12,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"avgLeverageUnprofitablePosition","type":"number[]","required":true,"description":"Apalancamiento promedio de las posiciones perdedoras — nocional sobre margen, como un múltiplo simple.","schema":{"type":"number[]","types":["array"],"description":"Apalancamiento promedio de las posiciones perdedoras — nocional sobre margen, como un múltiplo simple.","example":20,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"topMarket","type":"string[]","required":true,"description":"Ticker del activo base del mercado más negociado, por número de posiciones cerradas. Nulo cuando no se ha cerrado nada.","schema":{"type":"string[]","types":["array"],"description":"Ticker del activo base del mercado más negociado, por número de posiciones cerradas. Nulo cuando no se ha cerrado nada.","example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"topMarketPercent","type":"number[]","required":true,"description":"Proporción de posiciones cerradas que estaban en `topMarket`, en porcentaje con dos decimales.","schema":{"type":"number[]","types":["array"],"description":"Proporción de posiciones cerradas que estaban en `topMarket`, en porcentaje con dos decimales.","example":41.67,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}}],"variants":[]},"exampleDiagnostic":"Body.riskRewardRatio must be array Body.maxDrawdownPercent must be array Body.avgLeverageProfitablePosition must be array","headers":[]},{"status":"401","description":"No autorizado","properties":[],"headers":[]},{"status":"403","description":"La cuenta pertenece a otro usuario (`account_access_denied`), o la solicitud se autentica con una clave de API mientras `api_trading` está deshabilitado en la cuenta (`api_trading_not_enabled`).","properties":[],"headers":[]},{"status":"404","description":"No hay ninguna cuenta con este identificador.","properties":[],"headers":[]},{"status":"429","description":"Se superó el límite de velocidad de la clave de API (`api_key_rate_limit_exceeded`). `Retry-After` indica cuándo volver; el cuerpo incluye el bucket (`read` / `write`), la ventana que se activó, su límite y `retryAt`.","properties":[],"headers":[]}],"security":[{"name":"bearer","type":"http · bearer","description":"Clave de API personal, con el prefijo `usk_`.","required":true,"scopes":[]}],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.upscale.trade/accounts/{accountId}/stats' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.upscale.trade/accounts/{accountId}/stats\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\n  },\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.upscale.trade/accounts/{accountId}/stats\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"Qué es el prop trading","url":"https://docs.upscale.trade/es"},{"title":"Developers","url":"https://docs.upscale.trade/es/developers"},{"title":"Obtener estadísticas de trading de la cuenta del trader","url":"https://docs.upscale.trade/es/developers/operations/getaccounttradingstats"}],"headings":[{"depth":2,"id":"authorization","title":"Autorización"},{"depth":2,"id":"parameters","title":"Parámetros"},{"depth":2,"id":"examples","title":"Ejemplos"},{"depth":2,"id":"responses","title":"Respuestas"}],"markdown":"# Obtener estadísticas de trading de la cuenta del trader\n\n`GET /accounts/{accountId}/stats`\n\nAgregados sobre las posiciones cerradas de la cuenta: tasa de aciertos, beneficio y pérdida promedio, ratio riesgo-beneficio, drawdown máximo y tiempos de tenencia promedio.\n\n- Responde con un cuerpo vacío mientras la cuenta aún no tiene posiciones cerradas.\n- Cubre cada fase por la que ha pasado la cuenta, no solo la actual.\n\n<a id=\"authorization\"></a>\n\n## Autorización\n\nbearer: http · bearer (obligatorio). Clave de API personal, con el prefijo `usk_`.\n\n<a id=\"parameters\"></a>\n\n## Parámetros\n\n- path: accountId (string · uuid; obligatorio). Identificador de la cuenta del trader. Debe pertenecer al solicitante.\n\nTipo: string · uuid\n\nformat: uuid\n\n<a id=\"example-curl\"></a>\n\n## Ejemplo · cURL\n\n```bash\ncurl --request GET 'https://api.upscale.trade/accounts/{accountId}/stats' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n```\n\n<a id=\"example-javascript\"></a>\n\n## Ejemplo · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.upscale.trade/accounts/{accountId}/stats\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\n  },\n});\nconsole.log(response.status, await response.text());\n```\n\n<a id=\"example-python\"></a>\n\n## Ejemplo · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.upscale.trade/accounts/{accountId}/stats\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n<a id=\"response-200-accounttradingstatsresponse\"></a>\n\n## Respuesta 200 · AccountTradingStatsResponse\n\n**200** application/json — Respuesta\n\nBody.riskRewardRatio must be array Body.maxDrawdownPercent must be array Body.avgLeverageProfitablePosition must be array\n\nEsquema: AccountTradingStatsResponse\n\nTipo: object\n\nCampos obligatorios: sumPnl, sumFee, sumFunding, profit, positionsCount, profitablePositionsCount, unprofitablePositionsCount, winratePercent, minProfit, minLoss, maxProfit, maxLoss, avgProfit, avgLoss, riskRewardRatio, maxDrawdownPercent, avgLongPositionHoldTime, avgShortPositionHoldTime, avgPositionHoldTime, medianPositionHoldTime, maxProfitablePositionHoldTime, maxUnprofitablePositionHoldTime, medianProfitablePositionHoldTime, medianUnprofitablePositionHoldTime, avgLeverageProfitablePosition, avgLeverageUnprofitablePosition, topMarket, topMarketPercent\n\nTipos de campos obligatorios: sumPnl (string · int32; obligatorio), sumFee (string · int32; obligatorio), sumFunding (string · int32; obligatorio), profit (string · int32; obligatorio), positionsCount (number; obligatorio), profitablePositionsCount (number; obligatorio), unprofitablePositionsCount (number; obligatorio), winratePercent (number; obligatorio), minProfit (string · int32 · nullable; obligatorio), minLoss (string · int32 · nullable; obligatorio), maxProfit (string · int32 · nullable; obligatorio), maxLoss (string · int32 · nullable; obligatorio), avgProfit (string · int32 · nullable; obligatorio), avgLoss (string · int32 · nullable; obligatorio), riskRewardRatio (number[]; obligatorio), maxDrawdownPercent (number[]; obligatorio), avgLongPositionHoldTime (number[]; obligatorio), avgShortPositionHoldTime (number[]; obligatorio), avgPositionHoldTime (number[]; obligatorio), medianPositionHoldTime (number[]; obligatorio), maxProfitablePositionHoldTime (number[]; obligatorio), maxUnprofitablePositionHoldTime (number[]; obligatorio), medianProfitablePositionHoldTime (number[]; obligatorio), medianUnprofitablePositionHoldTime (number[]; obligatorio), avgLeverageProfitablePosition (number[]; obligatorio), avgLeverageUnprofitablePosition (number[]; obligatorio), topMarket (string[]; obligatorio), topMarketPercent (number[]; obligatorio)\n\n- sumPnl (string · int32; obligatorio)\n\nsumPnl ejemplo: 1000000000\n\nsumPnl.Tipo: string · int32\n\nsumPnl.pnl realizado sumado sobre cada posición cerrada, fp9 en bruto, antes de comisiones y financiación.\n\nsumPnl.format: int32\n\nsumPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- sumFee (string · int32; obligatorio)\n\nsumFee ejemplo: 1000000000\n\nsumFee.Tipo: string · int32\n\nsumFee.Comisiones de trading pagadas sobre cada posición cerrada, fp9 en bruto.\n\nsumFee.format: int32\n\nsumFee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- sumFunding (string · int32; obligatorio)\n\nsumFunding ejemplo: 1000000000\n\nsumFunding.Tipo: string · int32\n\nsumFunding.Financiación liquidada sobre cada posición cerrada, fp9 en bruto. Positiva cuando la cuenta recibió más de lo que pagó.\n\nsumFunding.format: int32\n\nsumFunding.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- profit (string · int32; obligatorio)\n\nprofit ejemplo: 1000000000\n\nprofit.Tipo: string · int32\n\nprofit.Resultado neto de las posiciones cerradas, fp9 en bruto: pnl menos comisiones más financiación. Esto es según lo que se divide la tasa de aciertos.\n\nprofit.format: int32\n\nprofit.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- positionsCount (number; obligatorio)\n\npositionsCount ejemplo: 0\n\npositionsCount.Tipo: number\n\npositionsCount.Número de posiciones cerradas a partir de las cuales se construyen las estadísticas.\n\n- profitablePositionsCount (number; obligatorio)\n\nprofitablePositionsCount ejemplo: 0\n\nprofitablePositionsCount.Tipo: number\n\nprofitablePositionsCount.Posiciones cerradas que terminaron en el punto de equilibrio o por encima de él.\n\n- unprofitablePositionsCount (number; obligatorio)\n\nunprofitablePositionsCount ejemplo: 0\n\nunprofitablePositionsCount.Tipo: number\n\nunprofitablePositionsCount.Posiciones cerradas que terminaron por debajo del punto de equilibrio.\n\n- winratePercent (number; obligatorio)\n\nwinratePercent ejemplo: 62.5\n\nwinratePercent.Tipo: number\n\nwinratePercent.Proporción de posiciones cerradas que terminaron en el punto de equilibrio o por encima de él, en porcentaje con dos decimales.\n\n- minProfit (string · int32 · nullable; obligatorio)\n\nminProfit ejemplo: 1000000000\n\nminProfit.Tipo: string · int32 · nullable\n\nminProfit.Ganancia más pequeña entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.\n\nminProfit.format: int32\n\nminProfit.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- minLoss (string · int32 · nullable; obligatorio)\n\nminLoss ejemplo: 1000000000\n\nminLoss.Tipo: string · int32 · nullable\n\nminLoss.Pérdida más pequeña entre las posiciones perdedoras, fp9 en bruto (negativa, la más cercana a cero). Nulo cuando no hay ninguna.\n\nminLoss.format: int32\n\nminLoss.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- maxProfit (string · int32 · nullable; obligatorio)\n\nmaxProfit ejemplo: 1000000000\n\nmaxProfit.Tipo: string · int32 · nullable\n\nmaxProfit.Ganancia más grande, fp9 en bruto. Nulo cuando ninguna posición terminó en ganancia.\n\nmaxProfit.format: int32\n\nmaxProfit.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- maxLoss (string · int32 · nullable; obligatorio)\n\nmaxLoss ejemplo: 1000000000\n\nmaxLoss.Tipo: string · int32 · nullable\n\nmaxLoss.Pérdida más grande, fp9 en bruto (el valor más negativo). Nulo cuando ninguna posición terminó en pérdida.\n\nmaxLoss.format: int32\n\nmaxLoss.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- avgProfit (string · int32 · nullable; obligatorio)\n\navgProfit ejemplo: 1000000000\n\navgProfit.Tipo: string · int32 · nullable\n\navgProfit.Ganancia promedio entre las posiciones rentables, fp9 en bruto. Nulo cuando no hay ninguna.\n\navgProfit.format: int32\n\navgProfit.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- avgLoss (string · int32 · nullable; obligatorio)\n\navgLoss ejemplo: 1000000000\n\navgLoss.Tipo: string · int32 · nullable\n\navgLoss.Pérdida promedio entre las posiciones perdedoras, fp9 en bruto (negativa). Nulo cuando no hay ninguna.\n\navgLoss.format: int32\n\navgLoss.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- riskRewardRatio (number[]; obligatorio)\n\nriskRewardRatio.Tipo: number[]\n\nriskRewardRatio.Ganancia promedio sobre la pérdida promedio absoluta. Nulo mientras no exista ninguna posición perdedora por la que dividir.\n\nriskRewardRatio.[]Tipo: number\n\n- maxDrawdownPercent (number[]; obligatorio)\n\nmaxDrawdownPercent.Tipo: number[]\n\nmaxDrawdownPercent.La mayor caída del capital de la cuenta en todas sus fases, en porcentaje con dos decimales.\n\nmaxDrawdownPercent.[]Tipo: number\n\n- avgLongPositionHoldTime (number[]; obligatorio)\n\navgLongPositionHoldTime ejemplo: [\n  0\n]\n\navgLongPositionHoldTime.Tipo: number[]\n\navgLongPositionHoldTime.Tiempo promedio de mantenimiento de las posiciones largas, en segundos.\n\navgLongPositionHoldTime.[]Tipo: number\n\n- avgShortPositionHoldTime (number[]; obligatorio)\n\navgShortPositionHoldTime ejemplo: [\n  0\n]\n\navgShortPositionHoldTime.Tipo: number[]\n\navgShortPositionHoldTime.Tiempo promedio de mantenimiento de las posiciones cortas, en segundos.\n\navgShortPositionHoldTime.[]Tipo: number\n\n- avgPositionHoldTime (number[]; obligatorio)\n\navgPositionHoldTime ejemplo: [\n  0\n]\n\navgPositionHoldTime.Tipo: number[]\n\navgPositionHoldTime.Tiempo promedio de tenencia en todas las posiciones cerradas, en segundos.\n\navgPositionHoldTime.[]Tipo: number\n\n- medianPositionHoldTime (number[]; obligatorio)\n\nmedianPositionHoldTime ejemplo: [\n  0\n]\n\nmedianPositionHoldTime.Tipo: number[]\n\nmedianPositionHoldTime.Mediana del tiempo de tenencia en todas las posiciones cerradas, en segundos.\n\nmedianPositionHoldTime.[]Tipo: number\n\n- maxProfitablePositionHoldTime (number[]; obligatorio)\n\nmaxProfitablePositionHoldTime ejemplo: [\n  0\n]\n\nmaxProfitablePositionHoldTime.Tipo: number[]\n\nmaxProfitablePositionHoldTime.Tiempo máximo que se mantuvo una posición rentable, en segundos.\n\nmaxProfitablePositionHoldTime.[]Tipo: number\n\n- maxUnprofitablePositionHoldTime (number[]; obligatorio)\n\nmaxUnprofitablePositionHoldTime ejemplo: [\n  0\n]\n\nmaxUnprofitablePositionHoldTime.Tipo: number[]\n\nmaxUnprofitablePositionHoldTime.Tiempo máximo que se mantuvo una posición perdedora, en segundos.\n\nmaxUnprofitablePositionHoldTime.[]Tipo: number\n\n- medianProfitablePositionHoldTime (number[]; obligatorio)\n\nmedianProfitablePositionHoldTime ejemplo: [\n  0\n]\n\nmedianProfitablePositionHoldTime.Tipo: number[]\n\nmedianProfitablePositionHoldTime.Mediana del tiempo de tenencia de las posiciones rentables, en segundos.\n\nmedianProfitablePositionHoldTime.[]Tipo: number\n\n- medianUnprofitablePositionHoldTime (number[]; obligatorio)\n\nmedianUnprofitablePositionHoldTime ejemplo: [\n  0\n]\n\nmedianUnprofitablePositionHoldTime.Tipo: number[]\n\nmedianUnprofitablePositionHoldTime.Mediana del tiempo de mantenimiento de las posiciones perdedoras, en segundos.\n\nmedianUnprofitablePositionHoldTime.[]Tipo: number\n\n- avgLeverageProfitablePosition (number[]; obligatorio)\n\navgLeverageProfitablePosition.Tipo: number[]\n\navgLeverageProfitablePosition.Apalancamiento promedio de las posiciones rentables — nocional sobre margen, como un múltiplo simple.\n\navgLeverageProfitablePosition.[]Tipo: number\n\n- avgLeverageUnprofitablePosition (number[]; obligatorio)\n\navgLeverageUnprofitablePosition.Tipo: number[]\n\navgLeverageUnprofitablePosition.Apalancamiento promedio de las posiciones perdedoras — nocional sobre margen, como un múltiplo simple.\n\navgLeverageUnprofitablePosition.[]Tipo: number\n\n- topMarket (string[]; obligatorio)\n\ntopMarket.Tipo: string[]\n\ntopMarket.Ticker del activo base del mercado más negociado, por número de posiciones cerradas. Nulo cuando no se ha cerrado nada.\n\ntopMarket.[]Tipo: string\n\n- topMarketPercent (number[]; obligatorio)\n\ntopMarketPercent.Tipo: number[]\n\ntopMarketPercent.Proporción de posiciones cerradas que estaban en `topMarket`, en porcentaje con dos decimales.\n\ntopMarketPercent.[]Tipo: number\n\n<a id=\"response-401\"></a>\n\n## Respuesta 401\n\n**401**  — No autorizado\n\n<a id=\"response-403\"></a>\n\n## Respuesta 403\n\n**403**  — La cuenta pertenece a otro usuario (`account_access_denied`), o la solicitud se autentica con una clave de API mientras `api_trading` está deshabilitado en la cuenta (`api_trading_not_enabled`).\n\n<a id=\"response-404\"></a>\n\n## Respuesta 404\n\n**404**  — No hay ninguna cuenta con este identificador.\n\n<a id=\"response-429\"></a>\n\n## Respuesta 429\n\n**429**  — Se superó el límite de velocidad de la clave de API (`api_key_rate_limit_exceeded`). `Retry-After` indica cuándo volver; el cuerpo incluye el bucket (`read` / `write`), la ventana que se activó, su límite y `retryAt`.","text":"Obtener estadísticas de trading de la cuenta del trader Agregados sobre las posiciones cerradas de la cuenta: tasa de aciertos, beneficio y pérdida promedio, ratio riesgo-beneficio, drawdown máximo y tiempos de tenencia promedio. - Responde con un cuerpo vacío mientras la cuenta aún no tiene posiciones cerradas. - Cubre cada fase por la que ha pasado la cuenta, no solo la actual. GET /accounts/{accountId}/stats Accounts accountId Identificador de la cuenta del trader. Debe pertenecer al solicitante. string · uuid 200 Respuesta sumPnl Realised pnl summed over every closed position, fp9 raw, before fees and funding. string · int32 sumFee Trading fees paid over every closed position, fp9 raw. string · int32 sumFunding Funding settled over every closed position, fp9 raw. Positive when the account received more than it paid. string · int32 profit Net result of the closed positions, fp9 raw: pnl minus fees plus funding. This is what the win rate splits on. string · int32 positionsCount Number of closed positions the statistics are built from. number profitablePositionsCount Closed positions that ended at or above break-even. number unprofitablePositionsCount Closed positions that ended below break-even. number winratePercent Share of closed positions that ended at or above break-even, in percent with two decimals. number minProfit Smallest win among profitable positions, fp9 raw. Null when there is none. string · int32 · nullable minLoss Smallest loss among losing positions, fp9 raw (negative, closest to zero). Null when there is none. string · int32 · nullable maxProfit Largest win, fp9 raw. Null when no position ended in profit. string · int32 · nullable maxLoss Largest loss, fp9 raw (the most negative value). Null when no position ended in loss. string · int32 · nullable avgProfit Average win across profitable positions, fp9 raw. Null when there is none. string · int32 · nullable avgLoss Average loss across losing positions, fp9 raw (negative). Null when there is none. string · int32 · nullable riskRewardRatio Average win over the absolute average loss. Null while no losing position exists to divide by. number[] maxDrawdownPercent Deepest equity drawdown of the account across all its phases, in percent with two decimals. number[] avgLongPositionHoldTime Average holding time of long positions, in seconds. number[] avgShortPositionHoldTime Average holding time of short positions, in seconds. number[] avgPositionHoldTime Average holding time across all closed positions, in seconds. number[] medianPositionHoldTime Median holding time across all closed positions, in seconds. number[] maxProfitablePositionHoldTime Longest a profitable position was held, in seconds. number[] maxUnprofitablePositionHoldTime Longest a losing position was held, in seconds. number[] medianProfitablePositionHoldTime Median holding time of profitable positions, in seconds. number[] medianUnprofitablePositionHoldTime Median holding time of losing positions, in seconds. number[] avgLeverageProfitablePosition Average leverage of profitable positions — notional over margin, as a plain multiple. number[] avgLeverageUnprofitablePosition Average leverage of losing positions — notional over margin, as a plain multiple. number[] topMarket Base asset ticker of the most traded market, by number of closed positions. Null when nothing has been closed. string[] topMarketPercent Share of closed positions that were on `topMarket`, in percent with two decimals. number[] 401 No autorizado 403 La cuenta pertenece a otro usuario (`account_access_denied`), o la solicitud se autentica con una clave de API mientras `api_trading` está deshabilitado en la cuenta (`api_trading_not_enabled`). 404 No hay ninguna cuenta con este identificador. 429 Se superó el límite de velocidad de la clave de API (`api_key_rate_limit_exceeded`). `Retry-After` indica cuándo volver; el cuerpo incluye el bucket (`read` / `write`), la ventana que se activó, su límite y `retryAt`.","api":{"title":"API pública de Upscale","version":"d796ac9","documentation":"https://docs.upscale.trade/es/developers","playgroundServer":"https://api.upscale.trade"}}