Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Aug 30, 2024
1 parent 19b9d30 commit ad826be
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 518 deletions.
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

Types:

- <code><a href="./src/resources/shared.ts">BaseStrategy</a></code>
- <code><a href="./src/resources/shared.ts">LocateOrder</a></code>
- <code><a href="./src/resources/shared.ts">Order</a></code>
- <code><a href="./src/resources/shared.ts">PnlSummaryForAccount</a></code>
- <code><a href="./src/resources/shared.ts">Position</a></code>
- <code><a href="./src/resources/shared.ts">RegtMarginSimulation</a></code>
- <code><a href="./src/resources/shared.ts">Strategy</a></code>
- <code><a href="./src/resources/shared.ts">Trade</a></code>

# Entities
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ export namespace StudioSDK {
export import Instrument = API.Instrument;
export import InstrumentRetrieveParams = API.InstrumentRetrieveParams;

export import BaseStrategy = API.BaseStrategy;
export import LocateOrder = API.LocateOrder;
export import Order = API.Order;
export import PnlSummaryForAccount = API.PnlSummaryForAccount;
export import Position = API.Position;
export import RegtMarginSimulation = API.RegtMarginSimulation;
export import Strategy = API.Strategy;
export import Trade = API.Trade;
}

Expand Down
143 changes: 2 additions & 141 deletions src/resources/accounts/bulk-orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as BulkOrdersAPI from './bulk-orders';
import * as Shared from '../shared';

export class BulkOrders extends APIResource {
/**
Expand Down Expand Up @@ -143,153 +144,13 @@ export namespace BulkOrderCreateParams {
* The execution strategy to use for this order. If not provided, our smart
* order-router will handle execution for your order.
*/
strategy?:
| Order.BaseStrategy
| Order.BaseStrategy
| Order.BaseStrategy
| Order.BaseStrategy
| Order.BaseStrategy
| Order.BaseStrategy;
strategy?: Shared.Strategy;

/**
* Denotes the format of the provided `symbol` field.
*/
symbol_format?: 'cms' | 'osi';
}

export namespace Order {
export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}
}
}

export namespace BulkOrders {
Expand Down
142 changes: 1 addition & 141 deletions src/resources/accounts/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,154 +183,14 @@ export interface OrderCreateParams {
* The execution strategy to use for this order. If not provided, our smart
* order-router will handle execution for your order.
*/
strategy?:
| OrderCreateParams.BaseStrategy
| OrderCreateParams.BaseStrategy
| OrderCreateParams.BaseStrategy
| OrderCreateParams.BaseStrategy
| OrderCreateParams.BaseStrategy
| OrderCreateParams.BaseStrategy;
strategy?: Shared.Strategy;

/**
* Denotes the format of the provided `symbol` field.
*/
symbol_format?: 'cms' | 'osi';
}

export namespace OrderCreateParams {
export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}

export interface BaseStrategy {
/**
* The type of strategy. This must be set to the respective strategy type.
*/
type: 'sor' | 'dark' | 'ap' | 'pov' | 'twap' | 'vwap';

/**
* The timestamp to stop routing, defaults to market close.
*/
end_at?: number;

/**
* The timestamp to start routing, defaults to now.
*/
start_at?: number;

/**
* The urgency associated with the execution strategy.
*/
urgency?: 'super-passive' | 'passive' | 'moderate' | 'aggressive' | 'super-aggressive';
}
}

export interface OrderListParams {
/**
* Milliseconds since epoch timestamp. This will constrain the search for orders
Expand Down
Loading

0 comments on commit ad826be

Please sign in to comment.