Skip to content

Commit

Permalink
add liquidations/navi on sui
Browse files Browse the repository at this point in the history
  • Loading branch information
kayisgood committed Oct 12, 2023
1 parent 412ab4e commit ea37299
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions liquidations/navi/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Liq } from "../utils/types";
import axios from "axios";

const liquidations = async () => {
const info = await axios.get("https://api-defi.naviprotocol.io/estimateLiquidateUser");

return info.data.map(
({ owner, liqPrice, collateral, collateralAmount }) =>
({
owner,
liqPrice,
collateral,
collateralAmount,
} as Liq)
);
};

module.exports = {
sui: {
liquidations,
},
};

0 comments on commit ea37299

Please sign in to comment.