const express = require("express");
const { authenticate } = require("../middleware/login.middleware.js");

const {
  postTrading,
  getTradingByAddress,
  getTradingByID,
  getTrading,
  deleteTrading,
} = require("../controllers/trading.controller.js");

const router = express.Router();

router.post("/", authenticate, postTrading);
router.get("/", getTrading);
router.get("/:id", getTradingByID);
router.get("/address/:tokenAddress", getTradingByAddress);
router.delete("/:id", deleteTrading);

module.exports = router;
