# Close Long

<figure><img src="https://1743545109-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F134K9qwR2RRL5RDcV9YV%2Fuploads%2FSLvmIpWP7RXDedDNLXEF%2FScreenshot%202023-12-10%20at%204.26.09%E2%80%AFPM.png?alt=media&#x26;token=47929cc4-7472-4905-9315-ae75e26d4969" alt=""><figcaption></figcaption></figure>

Notes:

* Changing Open to Close, all "From"s are changed to "To"s;&#x20;
* `premiumFrom` in "Close Long" has the same length as the `premiumTo` in "Open Long". Also, since `tokenFromOwed` is capped at `premiumFrom`, the minimum `amountSpent` is `(collateralFrom - amountFromAdd)`.
