Skip to content

kiiiyeon/Coinone-Server

ย 
ย 

Repository files navigation

Coinone-Server

๐ŸฆพํŠผํŠผ ์„œ๋ฒ„๐Ÿฆพ

request body

add-coin

path : /api/add-coin/ [POST]

{
    "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
    "coinEnglishTitle": "KLAY",
    "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
    "coinCurrentPrice": "1592",
    "riseOrDescent": "+",
    "degree": "66.8",
    "percentage": "3.64",
    "coinTotalPrice": "8957881877",
    "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
}

response body

{
    "_id": "60b742b0655d8e596cf963db",
    "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
    "coinEnglishTitle": "KLAY",
    "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
    "coinCurrentPrice": "1592",
    "riseOrDescent": "+",
    "degree": "66.8",
    "percentage": "3.64",
    "coinTotalPrice": "8957881877",
    "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
    "__v": 0
}

add-user

path : /api/add-user/:user_id

request body

[POST]

{
    "coinList": [
        {
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "BNA",
            "coinKoreanTitle": "๋ฐ”๋‚˜๋‚˜ํ†ก",
            "coinCurrentPrice": "60.5",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "0.2",
            "coinTotalPrice": "26006519283",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "KLAY",
            "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
            "coinCurrentPrice": "1592",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "3.64",
            "coinTotalPrice": "8957881877",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "ETH",
            "coinKoreanTitle": "์ด๋”๋ฆฌ์›€",
            "coinCurrentPrice": "3124000",
            "riseOrDescent": "+",
            "degree": "22000",
            "percentage": "0.71",
            "coinTotalPrice": "50203627033",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        }
    ]
}

response body

{
    "_id": "60b74105dfb2cc51ac007d93",
    "id": "2",
    "coin": [
        {
            "_id": "60b74105dfb2cc51ac007d94",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "BNA",
            "coinKoreanTitle": "๋ฐ”๋‚˜๋‚˜ํ†ก",
            "coinCurrentPrice": "60.5",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "0.2",
            "coinTotalPrice": "26006519283",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "_id": "60b74105dfb2cc51ac007d95",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "KLAY",
            "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
            "coinCurrentPrice": "1592",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "3.64",
            "coinTotalPrice": "8957881877",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "_id": "60b74105dfb2cc51ac007d96",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "ETH",
            "coinKoreanTitle": "์ด๋”๋ฆฌ์›€",
            "coinCurrentPrice": "3124000",
            "riseOrDescent": "+",
            "degree": "22000",
            "percentage": "0.71",
            "coinTotalPrice": "50203627033",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        }
    ],
    "__v": 0
}

my-coin

path : /api/my-coin/:id

ํ•ด๋‹น ์œ ์ €์˜ ๊ด€์‹ฌ ์ฝ”์ธ ๋œฌ๋‹ค

๋”๋ฏธ๋ฐ์ดํ„ฐ๋กœ id๊ฐ€ 1์ธ ์œ ์ € ๋„ฃ์–ด๋’€์Šต๋‹ˆ๋‹ค

Response Body

[GET]

{
    "coin": [
        {
            "_id": "60b740e7dfb2cc51ac007d90",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "BNA",
            "coinKoreanTitle": "๋ฐ”๋‚˜๋‚˜ํ†ก",
            "coinCurrentPrice": "60.5",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "0.2",
            "coinTotalPrice": "26006519283",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "_id": "60b740e7dfb2cc51ac007d91",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "KLAY",
            "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
            "coinCurrentPrice": "1592",
            "riseOrDescent": "+",
            "degree": "66.8",
            "percentage": "3.64",
            "coinTotalPrice": "8957881877",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        },
        {
            "_id": "60b740e7dfb2cc51ac007d92",
            "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
            "coinEnglishTitle": "ETH",
            "coinKoreanTitle": "์ด๋”๋ฆฌ์›€",
            "coinCurrentPrice": "3124000",
            "riseOrDescent": "+",
            "degree": "22000",
            "percentage": "0.71",
            "coinTotalPrice": "50203627033",
            "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png"
        }
    ]
}

coin-list

path : /api/coin-list/:sort/:ascending

sort ๊ฐ’์ด

title ์ด๋ฉด ์ฝ”์ธ๋ช… ๊ธฐ์ค€

current-price ์ด๋ฉด ํ˜„์žฌ๊ฐ€ ๊ธฐ์ค€

degree ์ด๋ฉด ๋“ฑ๋ฝ๋ฅ  ๊ธฐ์ค€

total-price ์ด๋ฉด ๊ฑฐ๋ž˜๋Œ€๊ธˆ ๊ธฐ์ค€

ascending ๊ฐ’์ด

1 ์ด๋ฉด ์˜ค๋ฆ„์ฐจ์ˆœ

-1 ์ด๋ฉด ๋‚ด๋ฆผ์ฐจ์ˆœ

Response Body

[GET]

[/api/coin-list/title/1]

[
    {
        "_id": "60b742a8655d8e596cf963da",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "BNA",
        "coinKoreanTitle": "๋ฐ”๋‚˜๋‚˜ํ†ก",
        "coinCurrentPrice": "60.5",
        "riseOrDescent": "+",
        "degree": "66.8",
        "percentage": "0.2",
        "coinTotalPrice": "26006519283",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b74337655d8e596cf963dd",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "ASTA",
        "coinKoreanTitle": "์•„์Šคํƒ€",
        "coinCurrentPrice": "87.66",
        "riseOrDescent": "+",
        "degree": "5.26",
        "percentage": "6.38",
        "coinTotalPrice": "29179278449",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b74332655d8e596cf963dc",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "ETH",
        "coinKoreanTitle": "์ด๋”๋ฆฌ์›€",
        "coinCurrentPrice": "3124000",
        "riseOrDescent": "+",
        "degree": "22000",
        "percentage": "0.71",
        "coinTotalPrice": "50203627033",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b742b0655d8e596cf963db",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "KLAY",
        "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
        "coinCurrentPrice": "1592",
        "riseOrDescent": "+",
        "degree": "66.8",
        "percentage": "3.64",
        "coinTotalPrice": "8957881877",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    }
]

[/api/coin-list/title/-1]

[
    {
        "_id": "60b742b0655d8e596cf963db",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "KLAY",
        "coinKoreanTitle": "ํด๋ ˆ์ดํŠผ",
        "coinCurrentPrice": "1592",
        "riseOrDescent": "+",
        "degree": "66.8",
        "percentage": "3.64",
        "coinTotalPrice": "8957881877",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b74332655d8e596cf963dc",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "ETH",
        "coinKoreanTitle": "์ด๋”๋ฆฌ์›€",
        "coinCurrentPrice": "3124000",
        "riseOrDescent": "+",
        "degree": "22000",
        "percentage": "0.71",
        "coinTotalPrice": "50203627033",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b74337655d8e596cf963dd",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "ASTA",
        "coinKoreanTitle": "์•„์Šคํƒ€",
        "coinCurrentPrice": "87.66",
        "riseOrDescent": "+",
        "degree": "5.26",
        "percentage": "6.38",
        "coinTotalPrice": "29179278449",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    },
    {
        "_id": "60b742a8655d8e596cf963da",
        "coinLogoImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY.png",
        "coinEnglishTitle": "BNA",
        "coinKoreanTitle": "๋ฐ”๋‚˜๋‚˜ํ†ก",
        "coinCurrentPrice": "60.5",
        "riseOrDescent": "+",
        "degree": "66.8",
        "percentage": "0.2",
        "coinTotalPrice": "26006519283",
        "graphImage": "https://sopt-8-coinone.s3.ap-northeast-2.amazonaws.com/KLAY_graph.png",
        "__v": 0
    }
]

About

๐ŸฆพํŠผํŠผ ์„œ๋ฒ„๐Ÿฆพ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.8%
  • Shell 4.2%