feat(deal-ticket): rename EstimatePosition argument
This commit is contained in:
parent
44189591fc
commit
8db286fa93
@ -281,7 +281,7 @@ export const DealTicket = ({
|
||||
marginFactor: margin?.marginFactor || '1',
|
||||
marginMode:
|
||||
margin?.marginMode || Schema.MarginMode.MARGIN_MODE_CROSS_MARGIN,
|
||||
includeCollateralIncreaseInAvailableCollateral: true,
|
||||
includeRequiredPositionMarginInAvailableCollateral: true,
|
||||
},
|
||||
!normalizedOrder ||
|
||||
(normalizedOrder.type !== Schema.OrderType.TYPE_MARKET &&
|
||||
|
@ -89,7 +89,7 @@ export const MarginChange = ({
|
||||
openVolume,
|
||||
marketId,
|
||||
orderMarginAccountBalance: orderMarginAccountBalance || '0',
|
||||
includeCollateralIncreaseInAvailableCollateral: true,
|
||||
includeRequiredPositionMarginInAvailableCollateral: true,
|
||||
orders,
|
||||
},
|
||||
skip
|
||||
|
@ -48,7 +48,7 @@ query EstimatePosition(
|
||||
$orderMarginAccountBalance: String!
|
||||
$marginMode: MarginMode!
|
||||
$marginFactor: String
|
||||
$includeCollateralIncreaseInAvailableCollateral: Boolean
|
||||
$includeRequiredPositionMarginInAvailableCollateral: Boolean
|
||||
) {
|
||||
estimatePosition(
|
||||
marketId: $marketId
|
||||
@ -60,7 +60,7 @@ query EstimatePosition(
|
||||
orderMarginAccountBalance: $orderMarginAccountBalance
|
||||
marginMode: $marginMode
|
||||
marginFactor: $marginFactor
|
||||
includeCollateralIncreaseInAvailableCollateral: $includeCollateralIncreaseInAvailableCollateral
|
||||
includeRequiredPositionMarginInAvailableCollateral: $includeRequiredPositionMarginInAvailableCollateral
|
||||
# Everywhere in the codebase we expect price values of the underlying to have the right
|
||||
# number of digits for formatting with market.decimalPlaces. By default the estimatePosition
|
||||
# query will return a full value requiring formatting using asset.decimals. For consistency
|
||||
|
@ -29,7 +29,7 @@ export type EstimatePositionQueryVariables = Types.Exact<{
|
||||
orderMarginAccountBalance: Types.Scalars['String'];
|
||||
marginMode: Types.MarginMode;
|
||||
marginFactor?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
includeCollateralIncreaseInAvailableCollateral?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
includeRequiredPositionMarginInAvailableCollateral?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
}>;
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ export function usePositionsSubscriptionSubscription(baseOptions: Apollo.Subscri
|
||||
export type PositionsSubscriptionSubscriptionHookResult = ReturnType<typeof usePositionsSubscriptionSubscription>;
|
||||
export type PositionsSubscriptionSubscriptionResult = Apollo.SubscriptionResult<PositionsSubscriptionSubscription>;
|
||||
export const EstimatePositionDocument = gql`
|
||||
query EstimatePosition($marketId: ID!, $openVolume: String!, $averageEntryPrice: String!, $orders: [OrderInfo!], $marginAccountBalance: String!, $generalAccountBalance: String!, $orderMarginAccountBalance: String!, $marginMode: MarginMode!, $marginFactor: String, $includeCollateralIncreaseInAvailableCollateral: Boolean) {
|
||||
query EstimatePosition($marketId: ID!, $openVolume: String!, $averageEntryPrice: String!, $orders: [OrderInfo!], $marginAccountBalance: String!, $generalAccountBalance: String!, $orderMarginAccountBalance: String!, $marginMode: MarginMode!, $marginFactor: String, $includeRequiredPositionMarginInAvailableCollateral: Boolean) {
|
||||
estimatePosition(
|
||||
marketId: $marketId
|
||||
openVolume: $openVolume
|
||||
@ -141,7 +141,7 @@ export const EstimatePositionDocument = gql`
|
||||
orderMarginAccountBalance: $orderMarginAccountBalance
|
||||
marginMode: $marginMode
|
||||
marginFactor: $marginFactor
|
||||
includeCollateralIncreaseInAvailableCollateral: $includeCollateralIncreaseInAvailableCollateral
|
||||
includeRequiredPositionMarginInAvailableCollateral: $includeRequiredPositionMarginInAvailableCollateral
|
||||
scaleLiquidationPriceToMarketDecimals: true
|
||||
) {
|
||||
collateralIncreaseEstimate {
|
||||
@ -185,7 +185,7 @@ export const EstimatePositionDocument = gql`
|
||||
* orderMarginAccountBalance: // value for 'orderMarginAccountBalance'
|
||||
* marginMode: // value for 'marginMode'
|
||||
* marginFactor: // value for 'marginFactor'
|
||||
* includeCollateralIncreaseInAvailableCollateral: // value for 'includeCollateralIncreaseInAvailableCollateral'
|
||||
* includeRequiredPositionMarginInAvailableCollateral: // value for 'includeRequiredPositionMarginInAvailableCollateral'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
|
2
libs/types/src/__generated__/types.ts
generated
2
libs/types/src/__generated__/types.ts
generated
@ -5015,7 +5015,7 @@ export type QueryestimateOrderArgs = {
|
||||
export type QueryestimatePositionArgs = {
|
||||
averageEntryPrice: Scalars['String'];
|
||||
generalAccountBalance: Scalars['String'];
|
||||
includeCollateralIncreaseInAvailableCollateral?: InputMaybe<Scalars['Boolean']>;
|
||||
includeRequiredPositionMarginInAvailableCollateral?: InputMaybe<Scalars['Boolean']>;
|
||||
marginAccountBalance: Scalars['String'];
|
||||
marginFactor?: InputMaybe<Scalars['String']>;
|
||||
marginMode: MarginMode;
|
||||
|
Loading…
Reference in New Issue
Block a user