AmountTransfer.quantityDelta - corda

corda / net.corda.core.contracts / AmountTransfer / quantityDelta

# quantityDelta

`val quantityDelta: Long`

is a signed Long value representing the exchanged number of tokens. If positive then it represents the movement of Math.abs(quantityDelta) tokens away from source and receipt of Math.abs(quantityDelta) at the destination. If the quantityDelta is negative then the source will receive Math.abs(quantityDelta) tokens and the destination will lose Math.abs(quantityDelta) tokens. Where possible the source and destination should be coded to ensure a positive quantityDelta, but in various scenarios it may be more consistent to allow positive and negative values. For example it is common for a bank to code asset flows as gains and losses from its perspective i.e. always the destination.

### Property

`quantityDelta` - is a signed Long value representing the exchanged number of tokens. If positive then it represents the movement of Math.abs(quantityDelta) tokens away from source and receipt of Math.abs(quantityDelta) at the destination. If the quantityDelta is negative then the source will receive Math.abs(quantityDelta) tokens and the destination will lose Math.abs(quantityDelta) tokens. Where possible the source and destination should be coded to ensure a positive quantityDelta, but in various scenarios it may be more consistent to allow positive and negative values. For example it is common for a bank to code asset flows as gains and losses from its perspective i.e. always the destination.