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',
|
marginFactor: margin?.marginFactor || '1',
|
||||||
marginMode:
|
marginMode:
|
||||||
margin?.marginMode || Schema.MarginMode.MARGIN_MODE_CROSS_MARGIN,
|
margin?.marginMode || Schema.MarginMode.MARGIN_MODE_CROSS_MARGIN,
|
||||||
includeCollateralIncreaseInAvailableCollateral: true,
|
includeRequiredPositionMarginInAvailableCollateral: true,
|
||||||
},
|
},
|
||||||
!normalizedOrder ||
|
!normalizedOrder ||
|
||||||
(normalizedOrder.type !== Schema.OrderType.TYPE_MARKET &&
|
(normalizedOrder.type !== Schema.OrderType.TYPE_MARKET &&
|
||||||
|
@ -89,7 +89,7 @@ export const MarginChange = ({
|
|||||||
openVolume,
|
openVolume,
|
||||||
marketId,
|
marketId,
|
||||||
orderMarginAccountBalance: orderMarginAccountBalance || '0',
|
orderMarginAccountBalance: orderMarginAccountBalance || '0',
|
||||||
includeCollateralIncreaseInAvailableCollateral: true,
|
includeRequiredPositionMarginInAvailableCollateral: true,
|
||||||
orders,
|
orders,
|
||||||
},
|
},
|
||||||
skip
|
skip
|
||||||
|
@ -48,7 +48,7 @@ query EstimatePosition(
|
|||||||
$orderMarginAccountBalance: String!
|
$orderMarginAccountBalance: String!
|
||||||
$marginMode: MarginMode!
|
$marginMode: MarginMode!
|
||||||
$marginFactor: String
|
$marginFactor: String
|
||||||
$includeCollateralIncreaseInAvailableCollateral: Boolean
|
$includeRequiredPositionMarginInAvailableCollateral: Boolean
|
||||||
) {
|
) {
|
||||||
estimatePosition(
|
estimatePosition(
|
||||||
marketId: $marketId
|
marketId: $marketId
|
||||||
@ -60,7 +60,7 @@ query EstimatePosition(
|
|||||||
orderMarginAccountBalance: $orderMarginAccountBalance
|
orderMarginAccountBalance: $orderMarginAccountBalance
|
||||||
marginMode: $marginMode
|
marginMode: $marginMode
|
||||||
marginFactor: $marginFactor
|
marginFactor: $marginFactor
|
||||||
includeCollateralIncreaseInAvailableCollateral: $includeCollateralIncreaseInAvailableCollateral
|
includeRequiredPositionMarginInAvailableCollateral: $includeRequiredPositionMarginInAvailableCollateral
|
||||||
# Everywhere in the codebase we expect price values of the underlying to have the right
|
# 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
|
# 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
|
# 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'];
|
orderMarginAccountBalance: Types.Scalars['String'];
|
||||||
marginMode: Types.MarginMode;
|
marginMode: Types.MarginMode;
|
||||||
marginFactor?: Types.InputMaybe<Types.Scalars['String']>;
|
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 PositionsSubscriptionSubscriptionHookResult = ReturnType<typeof usePositionsSubscriptionSubscription>;
|
||||||
export type PositionsSubscriptionSubscriptionResult = Apollo.SubscriptionResult<PositionsSubscriptionSubscription>;
|
export type PositionsSubscriptionSubscriptionResult = Apollo.SubscriptionResult<PositionsSubscriptionSubscription>;
|
||||||
export const EstimatePositionDocument = gql`
|
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(
|
estimatePosition(
|
||||||
marketId: $marketId
|
marketId: $marketId
|
||||||
openVolume: $openVolume
|
openVolume: $openVolume
|
||||||
@ -141,7 +141,7 @@ export const EstimatePositionDocument = gql`
|
|||||||
orderMarginAccountBalance: $orderMarginAccountBalance
|
orderMarginAccountBalance: $orderMarginAccountBalance
|
||||||
marginMode: $marginMode
|
marginMode: $marginMode
|
||||||
marginFactor: $marginFactor
|
marginFactor: $marginFactor
|
||||||
includeCollateralIncreaseInAvailableCollateral: $includeCollateralIncreaseInAvailableCollateral
|
includeRequiredPositionMarginInAvailableCollateral: $includeRequiredPositionMarginInAvailableCollateral
|
||||||
scaleLiquidationPriceToMarketDecimals: true
|
scaleLiquidationPriceToMarketDecimals: true
|
||||||
) {
|
) {
|
||||||
collateralIncreaseEstimate {
|
collateralIncreaseEstimate {
|
||||||
@ -185,7 +185,7 @@ export const EstimatePositionDocument = gql`
|
|||||||
* orderMarginAccountBalance: // value for 'orderMarginAccountBalance'
|
* orderMarginAccountBalance: // value for 'orderMarginAccountBalance'
|
||||||
* marginMode: // value for 'marginMode'
|
* marginMode: // value for 'marginMode'
|
||||||
* marginFactor: // value for 'marginFactor'
|
* 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 = {
|
export type QueryestimatePositionArgs = {
|
||||||
averageEntryPrice: Scalars['String'];
|
averageEntryPrice: Scalars['String'];
|
||||||
generalAccountBalance: Scalars['String'];
|
generalAccountBalance: Scalars['String'];
|
||||||
includeCollateralIncreaseInAvailableCollateral?: InputMaybe<Scalars['Boolean']>;
|
includeRequiredPositionMarginInAvailableCollateral?: InputMaybe<Scalars['Boolean']>;
|
||||||
marginAccountBalance: Scalars['String'];
|
marginAccountBalance: Scalars['String'];
|
||||||
marginFactor?: InputMaybe<Scalars['String']>;
|
marginFactor?: InputMaybe<Scalars['String']>;
|
||||||
marginMode: MarginMode;
|
marginMode: MarginMode;
|
||||||
|
Loading…
Reference in New Issue
Block a user