# PositionRequestDTO


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**comment** | **string** | Max 31 characters (broker limit). When opening a position via /rest/api/v1/accounts/{accountId}/positions, an \&#39;API|YOUR_REQUEST_ID|\&#39; prefix (5-8 chars) is prepended, so the effective user comment is ~23 chars before truncation. For modify requests, the full 31 characters are available. | [optional] [default to undefined]
**magicNumber** | **string** | At the moment, only numbers as string are supported | [optional] [default to undefined]
**openPrice** | **number** | Used for pending orders (buy limit, stop limit, ...). For buy or sell you can enter 0. | [default to 0]
**orderType** | **string** |  | [default to undefined]
**relativeTpSl** | **boolean** | When true, stop loss and take profit values are interpreted as distance in points from the fill price. The position will be opened first, then automatically modified with the calculated absolute SL/TP prices. For cTrader accounts, the platform handles this natively. For all other account types (MT4, MT5, etc.), the SL/TP is set via a fire-and-forget modify order after the position is opened. | [optional] [default to false]
**requestId** | **number** | A client request ID to avoid the request being executed multiple times due to network or client errors. The IDs start at 0 and increment up to 999, then begin again at 0. | [default to undefined]
**stopLoss** | **number** | A value of 0 means no stop loss | [default to 0]
**symbol** | **string** |  | [default to undefined]
**takeProfit** | **number** | A value of 0 means no take profit | [default to 0]
**volume** | **number** | In lots. The volume will be automatically adjusted according to the symbol data. | [default to undefined]

## Example

```typescript
import { PositionRequestDTO } from 'js-metacopier-api';

const instance: PositionRequestDTO = {
    comment,
    magicNumber,
    openPrice,
    orderType,
    relativeTpSl,
    requestId,
    stopLoss,
    symbol,
    takeProfit,
    volume,
};
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
