Simulate buying and selling Nexa options with AGNAR tokens
and predict NEXA price movements using a neural network
⚔ In the name of Fierce UTXO Kingdom ⚔
This script simulates a basic options trading platform, allowing users to buy and sell Nexa CALL and PUT options with AGNAR tokens. No real coins are involved.
Please note that this script is for demonstration purposes only and should not be used for actual trading or investment decisions. No real money is involved.
Key Features:
* Buy and sell CALL and PUT options with an option price set at 100 AGNAR tokens (not refundable), expiring at midnight UTC.
* NEXA coin price is updated every minute using the CoinGecko API.
* Predict NEXA price movements with a neural network model that leverages the power of the Synaptic library, real-time market data from CoinGecko API, and sentiment analysis from the Crypto Fear & Greed Index.
* Profit (in AGNAR tokens) is calculated using a conditional statement that applies a multiplier of 10,000,000 NEXA to the result of the strike price and the current price multiplied by 200 AGNAR tokens.
Final performance is calculated as profit minus option price. Loss is determined by the option price in AGNAR tokens.
For example, buying a CALL option assumes the NEXA price will increase. If the option price is 100 AGNAR, the initial loss is 100 AGNAR tokens. If the NEXA price increases, the loss decreases until your option becomes profitable, allowing you to receive a premium in AGNAR tokens.
* Manually selling options starts from the last option bought.
* View a record of all trades, including buy and sell transactions, stored in the browser indexedDB.
* Options expire automatically on the specified expiration date (10 seconds delay after the page loads). You can exercise (sell) options manually at any time before the expiration.
CALL options: 0, PUT options: 0