This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WebSocket from 'ws'; | |
const ws = new WebSocket('wss://ftx.com/ws/'); | |
let ping; | |
function open() { | |
ws.on('open', function open() { | |
ws.send(JSON.stringify({ | |
op: 'subscribe', | |
channel: 'ticker', | |
market: 'BTC-PERP' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
interface cETH { | |
// define functions of COMPOUND we'll be using | |
function mint() external payable; // to deposit to compound | |
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound | |
OlderNewer