# Settlements

Handles all Security Token Settlements related functionality Handles all Settlement related functionality

## Hierarchy

* Namespace‹[SecurityToken](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/securitytoken)›

  ↳ **Settlements**

## Index

### Properties

* [context](#protected-context)
* [parent](#protected-parent)

### Methods

* [canSettle](#cansettle)
* [canTransfer](#cantransfer)
* [getInstruction](#getinstruction)
* [getVenue](#getvenue)

## Properties

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/context)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Namespace.ts#L11)

*Defined in* [*src/Settlements.ts:10*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/Settlements.ts#L10)

### `Protected` parent

• **parent**: [*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/securitytoken)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Namespace.ts#L9)

## Methods

### canSettle

▸ **canSettle**(`args`: object): *Promise‹*[*TransferStatus*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/enums/transferstatus)*›*

*Defined in* [*src/api/entities/SecurityToken/Settlements.ts:38*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/SecurityToken/Settlements.ts#L38)

Check whether it is possible to create a settlement instruction to transfer a certain amount of this asset between two Portfolios.

**`note`** this takes locked tokens into account. For example, if portfolio A has 1000 tokens and this function is called to check if 700 of them can be transferred to portfolio B (assuming everything else checks out) the result will be success. If an instruction is created and authorized to transfer those 700 tokens, they would become locked. From that point, further calls to this function would yield failed results because of the funds being locked, even though they haven't been transferred yet

**`deprecated`** in favor of [canTransfer](#cantransfer)

**Parameters:**

▪ **args**: *object*

| Name     | Type                                                                                                          | Description                                                                       |
| -------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `amount` | BigNumber                                                                                                     | amount of tokens to transfer                                                      |
| `from?`  | [PortfolioLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/globals#portfoliolike) | sender Portfolio (optional, defaults to the current Identity's Default Portfolio) |
| `to`     | [PortfolioLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/globals#portfoliolike) | receiver Portfolio                                                                |

**Returns:** *Promise‹*[*TransferStatus*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/enums/transferstatus)*›*

### canTransfer

▸ **canTransfer**(`args`: object): *Promise‹*[*TransferBreakdown*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/transferbreakdown)*›*

*Defined in* [*src/api/entities/SecurityToken/Settlements.ts:108*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/SecurityToken/Settlements.ts#L108)

Check whether it is possible to create a settlement instruction to transfer a certain amount of this asset between two Portfolios. Returns a breakdown of the transaction containing general errors (such as insufficient balance or invalid receiver), any broken transfer restrictions, and any compliance failures

**`note`** this takes locked tokens into account. For example, if portfolio A has 1000 tokens and this function is called to check if 700 of them can be transferred to portfolio B (assuming everything else checks out) the result will be success. If an instruction is created and authorized to transfer those 700 tokens, they would become locked. From that point, further calls to this function would yield failed results because of the funds being locked, even though they haven't been transferred yet

**Parameters:**

▪ **args**: *object*

| Name     | Type                                                                                                          | Description                                                                       |
| -------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `amount` | BigNumber                                                                                                     | amount of tokens to transfer                                                      |
| `from?`  | [PortfolioLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/globals#portfoliolike) | sender Portfolio (optional, defaults to the current Identity's Default Portfolio) |
| `to`     | [PortfolioLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/globals#portfoliolike) | receiver Portfolio                                                                |

**Returns:** *Promise‹*[*TransferBreakdown*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/transferbreakdown)*›*

### getInstruction

▸ **getInstruction**(`args`: object): *Promise‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/instruction)*›*

*Defined in* [*src/Settlements.ts:45*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/Settlements.ts#L45)

Retrieve an Instruction by its id

**Parameters:**

▪ **args**: *object*

| Name | Type      |
| ---- | --------- |
| `id` | BigNumber |

**Returns:** *Promise‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/instruction)*›*

### getVenue

▸ **getVenue**(`args`: object): *Promise‹*[*Venue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/venue)*›*

*Defined in* [*src/Settlements.ts:24*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/Settlements.ts#L24)

Retrieve a Venue by its id

**Parameters:**

▪ **args**: *object*

| Name | Type      |
| ---- | --------- |
| `id` | BigNumber |

**Returns:** *Promise‹*[*Venue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/venue)*›*
