This project contains a Library of web components that interface with Cybrid's api, and a Demo Application containing them
The ui components are stored in library and are Angular Elements which bootstrap and wrap themselves in a Web Component. For more information visit Angular Elements or Web Components
NPM Package: @cybrid/cybrid-sdk-ui-js
More information: README
The current demo is continually updated and live for testing at: https://cybrid-app.github.io/cybrid-sdk-web/
To login you will need to have the following:
- Bank Api keys (Id and Secret) or a valid Bearer token
- Customer GUID
- Some prior setup for your bank/customer (see setup below)
The following setup should be preformed prior to using the Web Demo application.
- Create your customer using the
POST /api/customersAPI - Create a
type=fiataccount withasset=USDusingPOST /api/accountsAPI for your customer - Create a
type=tradingaccount withasset=BTCusing thePOST /api/accountsAPI (this is required to trade Bitcoin) - Create a
type=tradingaccount withasset=ETHusing thePOST /api/accountsAPI (this is required to trade Ether) - Create a
type=tradingaccount withasset=USDCusing thePOST /api/accountAPI (this is required to trade USDC)
The following are a set of first time steps you should follow in the Demo application.
NOTE: In Sandbox no real identity information or banking credentials are required
- Preform an identity verification using the
identity-verificationcomponent. Identity verifications can take some time because of the number of checks being preformed in the background. You may be asked to check back later for the status.
If you call GET /api/banks/{bank_guid} you will get back your bank details, which includes the features your bank is configured with.
If your bank is configured with a backstopped_funding_source you will need to make a transfer_type=book transfer via the transfers api. In Sandbox the transfer will always complete, in Production it can NSF.
If your bank is configured with a plaid_funding_source you will need to add an external bank account.
- (
plaid_funding_source) Connect a bank account using thebank-account-connectcomponent. In Sandbox you don't need to enter any real credentials into Plaid. Choose a bank from the list. Only select a single bank account (this is enforced in Production). If Plaid does ask for credentials:
Username: user_good
Password: pass_good
Once you have gone through Plaid and connected a bank account, the identity verification should be complete.
3. (plaid_funding_source) Transfer funds into the customer's fiat account using the transfer component. In Sandbox you are limited to transferring a max of $100 USD at a time.
- Your customer can now preform trades using the
tradecomponent.
Install Node. Current version: [email protected]
Run npm install from the project root to install dependencies
Run npm run package:library to build the library
Run ng serve for the demo server
While running the Demo locally most browsers will block Cybrid api requests due to Cross-Origin Resource Sharing (CORS) rules. You must disable CORS to properly view the demo. Here's a handy script (for Mac OSX) that opens a developer friendly instance of Google Chrome:
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-securityNavigate to http://localhost:4200/
To build the demo project run ng build
Run ng test to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
This project is licensed under Apache 2.0, found in LICENSE