2 User.sellStock Method
asdia edited this page 2021-01-06 23:00:53 +08:00
Class: User

Sells a stock from the user's account.

Parameters

Name Type Default Value Comment
Ticker string The stock's ticker
Amount number In credits
Price CreditAmount In credits

Returns

String
A string determining whether the transaction succeeded or failed.

Example

const user = new User('u-02c977bb-0a6c-4eb2-bfca-5e9101025aaf')
user.sellStock('VC', 1, 10)