@adaptic/utils 0.0.1012 → 0.0.1014

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/index.cjs +698 -116
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +695 -117
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/test.js +8 -0
  6. package/dist/test.js.map +1 -1
  7. package/dist/types/__tests__/alpaca-broker-error-preservation.test.d.ts +2 -0
  8. package/dist/types/__tests__/alpaca-broker-error-preservation.test.d.ts.map +1 -0
  9. package/dist/types/__tests__/metrics-calcs-direction.test.d.ts +2 -0
  10. package/dist/types/__tests__/metrics-calcs-direction.test.d.ts.map +1 -0
  11. package/dist/types/__tests__/protective-order-sides.test.d.ts +2 -0
  12. package/dist/types/__tests__/protective-order-sides.test.d.ts.map +1 -0
  13. package/dist/types/__tests__/technical-analysis-totality.test.d.ts +2 -0
  14. package/dist/types/__tests__/technical-analysis-totality.test.d.ts.map +1 -0
  15. package/dist/types/__tests__/trailing-stops-portfolio.test.d.ts +2 -0
  16. package/dist/types/__tests__/trailing-stops-portfolio.test.d.ts.map +1 -0
  17. package/dist/types/alpaca/index.d.ts +1 -1
  18. package/dist/types/alpaca/index.d.ts.map +1 -1
  19. package/dist/types/alpaca/legacy/orders.d.ts.map +1 -1
  20. package/dist/types/alpaca/trading/bracket-orders.d.ts +25 -3
  21. package/dist/types/alpaca/trading/bracket-orders.d.ts.map +1 -1
  22. package/dist/types/alpaca/trading/orders.d.ts.map +1 -1
  23. package/dist/types/alpaca/trading/oto-orders.d.ts +8 -2
  24. package/dist/types/alpaca/trading/oto-orders.d.ts.map +1 -1
  25. package/dist/types/alpaca/trading/trailing-stops.d.ts +6 -3
  26. package/dist/types/alpaca/trading/trailing-stops.d.ts.map +1 -1
  27. package/dist/types/alpaca-trading-api.d.ts.map +1 -1
  28. package/dist/types/asset-allocation-algorithm.d.ts.map +1 -1
  29. package/dist/types/errors/index.d.ts +149 -1
  30. package/dist/types/errors/index.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +3 -3
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/metrics-calcs.d.ts +6 -0
  34. package/dist/types/metrics-calcs.d.ts.map +1 -1
  35. package/dist/types/schemas/massive-schemas.d.ts +6 -6
  36. package/dist/types/technical-analysis.d.ts +26 -1
  37. package/dist/types/technical-analysis.d.ts.map +1 -1
  38. package/dist/types/trading-policy/defaults/default-trading-policy.d.ts.map +1 -1
  39. package/dist/types/types/metrics-types.d.ts +8 -1
  40. package/dist/types/types/metrics-types.d.ts.map +1 -1
  41. package/dist/types/types/ta-types.d.ts +10 -1
  42. package/dist/types/types/ta-types.d.ts.map +1 -1
  43. package/package.json +1 -1
package/dist/test.js CHANGED
@@ -8076,6 +8076,14 @@ const DEFAULT_TRADING_POLICY = EffectiveTradingPolicySchema.parse({
8076
8076
  optionsEnabled: true,
8077
8077
  futuresEnabled: true,
8078
8078
  forexEnabled: true,
8079
+ // Shorting and margin are capability opt-ins, not a directional stance.
8080
+ // Both require a margin agreement and locate/borrow availability the
8081
+ // package cannot verify, so an account that has not asserted the
8082
+ // capability defaults to the one it is known to have. This is a statement
8083
+ // about account permissions, never a preference for long over short — the
8084
+ // side a strategy takes is derived from live data once the capability is
8085
+ // enabled. Resolve these from the broker account's actual margin and
8086
+ // shorting entitlements wherever those are available.
8079
8087
  shortingEnabled: false,
8080
8088
  marginEnabled: false,
8081
8089
  fractionalSharesEnabled: true,