finevo-web
v0.0.29
Published
<h1 align="center">Finevo-Web</h1>
Downloads
10
Maintainers
Readme
📦 Install
npm install finevo-web
yarn add finevo-web
🔨 Usage
If you have not started with web components, we suggest you to visit the official docs
import { FinOrderForm, FinOrderBook } from 'finevo-web';
//register the component as a custom element with the browser
customElements.define('fin-order-form', FinOrderForm);
customElements.define('fin-order-book', FinOrderForm);
And using it with the accessToken
<fin-order-form accessToken="a-valid-jwt-token"></fin-order-form>
You will need to define an options property for the order form component in the following format (The order form will not load unless these properties as defined):
const FinOrderForm = document.querySelector('fin-order-form');
//attaching default properties
FinOrderForm.options = {
config: {...},
order:{
uuid: 'unique-id-for-the-orders',
price: 5.29,
side: '1',
triggerType: '3',
triggerPriceDirection: '1'
},
company: {
name: 'CIMB',
id: '1023',
exchange: 'BM',
type: 'NM',
}
};
//attaching listener to listen for order events from our Market Order Aggregator
OrderForm.addEventListener('order', event => console.log(event));
Alternatively, using js
const FinOrderForm = document.createElement('fin-order-form');
FinOrderForm.setAttribute('accessToken', 'a-valid-jwt-token');
document.body.appendChild(FinOrderForm);
FinOrderForm.options = {...};
📃 Property Configuration
Under construction 🔨🔨🔨