Commit Graph

578 Commits

Author SHA1 Message Date
Tyler Shipe 5b413a9089 update alpha modal 2021-08-25 14:49:04 -04:00
Tyler Shipe 8ac108ce35 update alpha modal 2021-08-25 14:47:57 -04:00
Tyler Shipe f8c14d193d Merge remote-tracking branch 'origin/name-account-first-deposit' into main 2021-08-25 13:52:00 -04:00
Tyler Shipe 3c6638357b show funding rate even when its 0 2021-08-25 13:43:17 -04:00
Tyler Shipe dd20e6223d fix stats api params 2021-08-25 13:40:32 -04:00
Tyler Shipe 66bf66fc7c remove unused utils fns 2021-08-25 10:23:30 -04:00
saml33 383a82e2d0 use new account modal for first deposit 2021-08-25 23:56:52 +10:00
saml33 2a1b8f59ea disable withdraw button when no account 2021-08-25 20:54:39 +10:00
Tyler Shipe b1215906a9 add more precision to trading view chart 2021-08-24 19:22:20 -04:00
Tyler Shipe b61e0b2f13 use latest client 2021-08-24 17:17:01 -04:00
Tyler Shipe d9019b961a reduce margin in trade form; remove leverage text from slider 2021-08-24 16:40:43 -04:00
Tyler Shipe f08e323e6c remove console logs 2021-08-24 16:01:43 -04:00
Tyler Shipe d51f4419ba clean up notification console logs 2021-08-24 15:43:34 -04:00
Tyler Shipe f46a7cec4b dont validate account name 2021-08-24 14:34:54 -04:00
Tyler Shipe 1c0962031b add notification when sol balance is low and when connecting wallet; disable connect button until walletadapter is loaded 2021-08-24 12:28:25 -04:00
Tyler Shipe d39e52de76 fix NaN under slider on perp side 2021-08-24 10:30:15 -04:00
Tyler Shipe 325b6c2424 fix the max withdraw modal to use client fn 2021-08-24 10:15:12 -04:00
saml33 e6c1cfca08 balance rounding in balances panel 2021-08-24 20:09:42 +10:00
saml33 072f450f18 remove rounding from balances on account page 2021-08-24 16:44:58 +10:00
Tyler Shipe 72eda925c1 use event-history-api for spot trades 2021-08-23 18:37:48 -04:00
Tyler Shipe 251b0a1d8d use the correct pk to get the perpmarket 2021-08-23 18:19:20 -04:00
Tyler Shipe 3f1e91399e add stat totals 2021-08-23 17:09:16 -04:00
Tyler Shipe 9c75a0dbd2 add available balance tooltip; update client for market margin available fix 2021-08-23 15:46:29 -04:00
Tyler Shipe de052ace29 add collateral available and market margin available 2021-08-23 15:35:59 -04:00
Tyler Shipe 1e45e2cc03 use maxWithBorrows amount if maxWithoutBorrows is greater 2021-08-23 14:36:02 -04:00
Tyler Shipe 1bbdc2a12e remove total asset and total liabs vals 2021-08-23 14:21:23 -04:00
Tyler Shipe 5e51ac46c3 add leverage to acct modal; fix rounding in withdraw modal 2021-08-23 14:18:34 -04:00
Tyler Shipe 3c47775de9 only clear current market if it's for a different market then whatsin the store 2021-08-23 14:04:18 -04:00
Tyler Shipe fbd6eeda3b use loaded perp market to display open interest 2021-08-23 13:58:37 -04:00
Tyler Shipe a7b5c8a96a more tweaks to improve orderbook websocket 2021-08-23 13:21:20 -04:00
Tyler Shipe b3cc717c86 use context slot to sync orderbook updates 2021-08-23 13:12:48 -04:00
saml33 246ac3d385 account page tweaks 2021-08-24 00:14:03 +10:00
saml33 945f8a1a90 add orders/position count 2021-08-22 22:45:10 +10:00
saml33 12db262794 remove extra 0 from orderbook price/size 2021-08-22 14:03:43 +10:00
saml33 287b71a476 remove rounding from orderbook markprice 2021-08-22 13:56:48 +10:00
saml33 a4da1f6272 use balance instead of deposits/borrows 2021-08-22 12:59:54 +10:00
saml33 b8a5b06ef2 market header loaders 2021-08-21 23:02:51 +10:00
saml33 af8db468bf fix position panel padding 2021-08-21 22:11:14 +10:00
saml33 5cc4719ef8 fix panel layout 2021-08-21 11:42:59 +10:00
saml33 978f72a381 remove double % on health ratio 2021-08-21 08:11:19 +10:00
dd 1b5cac89a1 fixed getPnl and settlePnl functions and updated client 2021-08-20 16:39:44 -04:00
Maximilian Schneider 40bb8ec7e5 reduce health ratio overflow 2021-08-20 17:42:50 +02:00
Maximilian Schneider e7ff1b7234 re-enable connect wallet button 2021-08-20 17:42:50 +02:00
dd 41022ac45b Fixed funding rate display issue; can be improved once stats server fixed 2021-08-20 11:01:18 -04:00
Maximilian Schneider 62c578d28d correctly set max lev 2021-08-20 15:41:43 +02:00
Maximilian Schneider e7557e3101 fix issue on account load 2021-08-20 15:37:49 +02:00
Maximilian Schneider 739d805310 add max button to leverage slider 2021-08-20 15:34:04 +02:00
Maximilian Schneider e68d128d8f add available margin & leverage slider 2021-08-20 15:34:04 +02:00
Maximilian Schneider 2ed82f222b refactor for clarity 2021-08-20 15:34:04 +02:00
saml33 51741bc9a3 loading states for connect wallet 2021-08-20 23:17:02 +10:00
saml33 cbd0e0b934 fill trade size from position size 2021-08-20 21:51:29 +10:00
Maximilian Schneider f59a9fed73 remove broken total borrows display 2021-08-20 12:07:51 +02:00
Maximilian Schneider b0d4b9353a display recent trades 2021-08-20 04:47:25 +02:00
Maximilian Schneider 665b824fa4 enable perp trading view 2021-08-20 04:20:36 +02:00
Tyler Shipe 56d9eb00ab fix perp position table 2021-08-19 20:14:04 -04:00
Tyler Shipe 8103a3cc85 disable leverage slider 2021-08-19 17:46:31 -04:00
saml33 afaa6b85ec consolidate new account flow to one step 2021-08-19 16:15:25 +10:00
Tyler Shipe 56b590589e fix new sub account modal 2021-08-18 21:05:16 -04:00
Tyler Shipe 2036b77de3 pass in decimal count to leverage slider 2021-08-18 20:37:50 -04:00
Tyler Shipe 1c64a8a252 show position closing in leverage slider 2021-08-18 20:33:45 -04:00
Tyler Shipe 8b310acc9b rename marginDeposits to deposits 2021-08-18 16:43:51 -04:00
Tyler Shipe 9bfa880be0 add padding to slider 2021-08-18 16:31:22 -04:00
Tyler Shipe 27760cd7c3 tweak slider styling 2021-08-18 16:29:39 -04:00
Tyler Shipe 0af7a8b8ee more trade form improvements 2021-08-18 16:15:17 -04:00
Tyler Shipe 86ea7afcff add leverage slider 2021-08-18 14:23:12 -04:00
Tyler Shipe 2105827769 reduce sleep after placing a trade 2021-08-18 11:01:42 -04:00
Tyler Shipe c0ec5655a3 fix taker fee in trade form 2021-08-18 10:33:03 -04:00
Tyler Shipe c598f79a4a remove fee tab; set trade form price on page load 2021-08-18 10:24:29 -04:00
saml33 abe87fba96 switch perp/spot order in menu 2021-08-18 22:55:04 +10:00
Tyler Shipe b3424df63e fix account naming when new sub account 2021-08-17 17:52:53 -04:00
Tyler Shipe deda8e58d6 position display tweaks 2021-08-17 17:01:00 -04:00
Tyler Shipe a7fc2c6c4d refactor 2021-08-17 16:50:16 -04:00
Tyler Shipe f7aa5b6bed fix lint errors 2021-08-17 16:48:42 -04:00
dd 800bea3306 added in self cranking for perp orders 2021-08-17 16:36:31 -04:00
Tyler Shipe 5c44d1fd34 fix when creating new mango accoung 2021-08-17 16:09:27 -04:00
Tyler Shipe dd074685e3 fix max withdraw with no borrows 2021-08-17 15:52:33 -04:00
Tyler Shipe 46d909ef6d add market fees to trade form box 2021-08-17 15:37:07 -04:00
Tyler Shipe 7d02331953 fetch mango account state if place trade fails 2021-08-17 14:05:25 -04:00
Tyler Shipe 65494917c1 add back account naming; await root bank loading 2021-08-17 13:47:52 -04:00
Tyler Shipe b8c203de74 move deposit withdraw button higher 2021-08-17 13:32:12 -04:00
Tyler Shipe afb09d828b add srm dex fee discount table 2021-08-17 13:14:39 -04:00
Tyler Shipe 8da8d0d973 handle when mango group isn't loaded 2021-08-17 11:10:32 -04:00
Tyler Shipe 6d5dbd8265 high side bade if no perp position 2021-08-16 18:40:56 -04:00
Tyler Shipe 17d73fc3cf more frequent mango acct updates 2021-08-16 18:10:06 -04:00
Tyler Shipe f44acbab27 handle large health ratio number 2021-08-16 17:35:40 -04:00
Tyler Shipe 1917ba41c7 reuse tooltip for settle pnl 2021-08-16 17:35:16 -04:00
Tyler Shipe 55aa3782c2 open Learn link in new tab 2021-08-16 17:34:43 -04:00
Tyler Shipe d3839c7268 open Learn link in new tab 2021-08-16 14:20:19 -04:00
Tyler Shipe 4431da772b add price to market select 2021-08-16 14:00:04 -04:00
Tyler Shipe 7cf80b566c remove blur from modals 2021-08-16 13:59:44 -04:00
Tyler Shipe 00a85cded2 Merge in styling changes 2021-08-16 13:00:43 -04:00
saml33 d7692f88cf move buttons to margininfo panel 2021-08-16 23:31:25 +10:00
Tyler Shipe 5d8bf9969e Finish max withdrawal simulation 2021-08-15 18:36:06 -04:00
Tyler Shipe 9c1f8edf20 rename positions table; fix rounding issues 2021-08-15 13:06:52 -04:00
saml33 df6e97763a format usd values and small ui fixes 2021-08-15 23:31:59 +10:00
Tyler Shipe 935cd46345 exclude perp liqs from trade history table 2021-08-14 19:24:55 -04:00
Tyler Shipe 99a6184cb1 add leverage 2021-08-14 17:14:43 -04:00
Tyler Shipe 5f5c703c5d wire up positions box 2021-08-14 16:05:31 -04:00
Tyler Shipe d4927731ee add breakeven and avg open price 2021-08-14 14:16:15 -04:00
saml33 4f4cd77c2d fix range percentage calc 2021-08-14 20:26:54 +10:00
Tyler Shipe 2e83ad6805 tweak page container width 2021-08-13 18:14:44 -04:00
Tyler Shipe 9df9a168ec use https 2021-08-13 18:03:21 -04:00
Tyler Shipe 682d5c2874 tweak price range decimals 2021-08-13 18:02:07 -04:00
Tyler Shipe 4b2ddf8a2b add 24h change styling 2021-08-13 17:45:22 -04:00
Tyler Shipe 90c91e53ed price range fixes 2021-08-13 17:30:39 -04:00
Tyler Shipe 654f9487c5 add trade history to account page 2021-08-13 16:02:12 -04:00
Tyler Shipe 7d086d2279 funding rate fixes 2021-08-13 15:10:50 -04:00
Tyler Shipe c703e64712 fix open interest display 2021-08-13 15:06:17 -04:00
Tyler Shipe ce03c3ad93 add funding rate and open interest 2021-08-13 14:54:09 -04:00
Tyler Shipe 10a881a811 wire up init account and deposit 2021-08-13 11:31:00 -04:00
Tyler Shipe b2f6eece1c fetch perp trade history from db 2021-08-13 11:05:49 -04:00
Tyler Shipe a019c06b28 use latest client 2021-08-12 19:50:36 -04:00
Tyler Shipe e1cb67d9fb fix decimals for markprice display 2021-08-12 15:39:10 -04:00
Tyler Shipe 3dadee255a remove console logs, use latest client 2021-08-06 18:49:17 -04:00
Tyler Shipe f8ee52eb7f fix to show trade history even when spot open order acct doesnt exist 2021-08-06 18:35:10 -04:00
Tyler Shipe 5144bdfe58 update accrued mngo in display 2021-08-05 14:55:18 -04:00
saml33 7eb63639ba add rewards to account page 2021-08-06 00:07:29 +10:00
Tyler Shipe 46b2f7ea21 show orderbook even if only just bid or just ask exists 2021-08-04 17:54:44 -04:00
Tyler Shipe c5866ee610 make health ratio red if init health is at or below zero 2021-08-04 17:47:05 -04:00
Tyler Shipe c2350d3d2e add tooltip for mngo accrued 2021-08-04 15:25:56 -04:00
Tyler Shipe aebe1401e4 remove mngo accrued from positions table 2021-08-04 15:03:07 -04:00
Tyler Shipe 5697006f7a wait for mango group to load in margin info 2021-08-04 14:58:10 -04:00
Tyler Shipe ea18b4bbc2 remove redeem mngo from perp positions table 2021-08-04 14:33:13 -04:00
Tyler Shipe 96b50431ca add redeem all mngo button 2021-08-04 14:31:32 -04:00
Tyler Shipe 85ed076fe0 sort trade history for perps 2021-08-04 12:46:14 -04:00
Tyler Shipe 02088a5d1c wire up redeem mngo to perp position table 2021-08-04 11:42:56 -04:00
Tyler Shipe f6bafcc6f1 fix balances 2021-08-03 19:32:24 -04:00
saml33 dd38990721 handle account change on account page 2021-08-02 22:44:58 +10:00
saml33 3c64b9f059 remove blur on success action 2021-08-02 15:14:24 +10:00
saml33 1f82731a85 add unsettled balances ui 2021-08-01 22:48:15 +10:00
Tyler Shipe 5703cbdc82 only show account name if it exists 2021-07-30 16:37:00 -04:00
Tyler Shipe caa4a29b23 add account naming 2021-07-30 16:33:03 -04:00
saml33 8076afecc4 notification styling 2021-07-30 22:06:27 +10:00
saml33 5ba3bfc517 fix nested button error 2021-07-30 20:30:58 +10:00
saml33 e810c5c215 improve theme and misc styling 2021-07-29 23:19:32 +10:00
saml33 e278b9d07f merge main 2021-07-29 12:30:25 +10:00
saml33 3ef138948f add usdt icon 2021-07-29 09:35:20 +10:00
saml33 aab7ab0aac add usdt mono icon 2021-07-29 09:04:55 +10:00
Tyler Shipe 2e33486dbb use latest group 2021-07-28 19:03:21 -04:00
Tyler Shipe f5e97aa7dc use liab weight in max borrow 2021-07-27 13:05:05 -04:00
Tyler Shipe bca4899e80 add market to trade history 2021-07-27 12:22:50 -04:00
Tyler Shipe e20506bd66 fix top bar links 2021-07-27 11:41:33 -04:00
Tyler Shipe 902c24916a prevent wrapping of change account button 2021-07-26 10:33:40 -04:00
Tyler Shipe 1f73cfbd7a merge 2021-07-26 09:44:21 -04:00
saml33 6b43d317e5 merge main 2021-07-26 19:36:06 +10:00
saml33 d95c2843c4 add portfolio view 2021-07-25 23:54:25 +10:00
Tyler Shipe be031cc0fe consistency with user info tabs 2021-07-24 16:15:27 -04:00
Tyler Shipe d35304e84f hide perp positions table if none open 2021-07-24 14:29:24 -04:00
Tyler Shipe 267639dec5 update positions and history tables 2021-07-24 14:12:52 -04:00
saml33 e96d11e437 merge main 2021-07-24 21:56:57 +10:00
saml33 7f53a44345 add name account ui 2021-07-24 21:49:18 +10:00
Tyler Shipe f79bc1639f remove alerts from v3 2021-07-23 13:14:18 -04:00
Tyler Shipe 8207659bb1 cleanup 2021-07-23 13:07:31 -04:00
saml33 34a4e5ee19 fix broken icons on page load 2021-07-22 22:50:50 +10:00
saml33 a5c643ab56 improve spot balances panel layout 2021-07-22 22:25:18 +10:00
saml33 d0797bf194 connect wallet empty states 2021-07-22 21:34:03 +10:00
Tyler Shipe 784c1c9d50 format stat numbers with commas 2021-07-21 17:47:10 -04:00
Tyler Shipe 05a46993ba add basic stats page 2021-07-21 17:26:18 -04:00
Tyler Shipe 562753f937 Merge branch 'main' into stats-page 2021-07-21 17:12:04 -04:00
Tyler Shipe 872c8c3581 add notification after settle all 2021-07-21 17:11:17 -04:00
Tyler Shipe 5c48d96775 don't try load market before group is loaded 2021-07-21 13:40:42 -04:00
Tyler Shipe 5077b5f182 add temp deposit withdraw buttons 2021-07-21 12:34:59 -04:00
Tyler Shipe c6886c884e fix size of margininfo pane 2021-07-21 12:07:15 -04:00
saml33 ce0eeffac0 add additional spot/perp data to trade page 2021-07-21 11:56:45 -04:00
Tyler Shipe 8beecf59f5 support sol deposits and withdrawals 2021-07-20 15:21:09 -04:00
Tyler Shipe 6e0018e251 reduce x padding 2021-07-19 23:04:26 -04:00
Tyler Shipe 9b110bc507 refresh open orders after canceling a differentmarket 2021-07-19 20:42:55 -04:00
Tyler Shipe 9a817e95f6 information density 2021-07-19 16:24:49 -04:00
Tyler Shipe 1a98657c7f simplify margin balances on trade page 2021-07-19 13:13:03 -04:00
saml33 29079a9957
Merge pull request #5 from blockworks-foundation/market-select
Market select
2021-07-19 09:52:39 +10:00
Tyler Shipe 48ba367384 reset grid local storage key 2021-07-18 13:44:01 -04:00
saml33 038c7bb01b new icons and show custom markets 2021-07-19 00:39:27 +10:00
saml33 f06d14d8f6 switch markets via base asset drop menu 2021-07-17 23:49:52 +10:00
Tyler Shipe ee271efb7e update positions table to use perpmarket base and quote decimals 2021-07-14 15:41:54 -04:00
Riordan Panayides 0ad4fccf20 Add basic perp stats component 2021-07-13 14:52:48 +01:00
Riordan Panayides 03349b7892 Merge remote-tracking branch 'origin/main' into stats-page 2021-07-13 14:46:09 +01:00
Tyler Shipe dda50c8aee update to latest client; use toFixed for I80F48 2021-07-12 12:55:16 -04:00
dd ca85a90b38 changed Balances interface for net; use toFixedUi 2021-07-08 10:16:39 -04:00
Tyler Shipe 0c82280855 fix trade history and refresh data bugs 2021-07-07 17:18:54 -04:00
Tyler Shipe c11890582d handle rounding errors 2021-07-07 16:38:04 -04:00
Tyler Shipe 6606dc1bff update tradeForm 2021-07-07 13:27:11 -04:00
Tyler Shipe 1bb61ad905 use latest PerpMarket field names 2021-07-07 11:46:25 -04:00
Tyler Shipe 53163e07a8 add more account values 2021-07-07 00:34:21 -04:00
Tyler Shipe 54b6230314 fill in account asset values 2021-07-06 20:13:17 -04:00
Tyler Shipe a0ba6f44e8 update notifications, wire up account change modal 2021-07-06 18:04:20 -04:00
Tyler Shipe c5ce8e965f render the accounts page 2021-07-05 14:21:57 -04:00
Tyler Shipe 974b41f2bf use I80F48 greater than 2021-07-05 13:18:54 -04:00
Tyler Shipe c355f7132e add Borrows page and health ratio 2021-07-05 11:03:57 -04:00
Riordan Panayides aea7b84b21 WIP stats page, market header oracle price 2021-07-03 02:18:57 +01:00
Riordan Panayides a17ec8b464 Update stats page 2021-07-02 13:07:24 +01:00
Tyler Shipe 671e50eba0 wip: max borrow calculations 2021-07-01 13:35:47 -04:00
Maximilian Schneider f516959f51 add position table component 2021-06-28 06:44:48 +02:00
Maximilian Schneider 40c46a6b98 add Positions table just displaying raw contract data 2021-06-25 13:30:51 +02:00
Tyler Shipe e9cdeb8a08 add settle all spot markets to balances 2021-06-24 18:15:23 -04:00
Tyler Shipe 619295d2e0 parsed trade history for perps 2021-06-24 16:57:11 -04:00
Tyler Shipe d44e6476b4 add orderbook mid price for perp 2021-06-24 13:54:59 -04:00
Tyler Shipe 25d41f2f58 display unparsed perp history 2021-06-24 12:30:45 -04:00
Tyler Shipe cb44650367 connect perp market to websocket for orderbook 2021-06-23 15:09:19 -04:00
saml33 af19cc7b23 toggle between spot and perp markets 2021-06-23 14:17:03 -04:00
Maximilian Schneider 778f8fac05 reenable health 2021-06-23 19:26:18 +02:00